Do not abort configure if no --enable-mod-- is given and the module
[idzebra-moved-to-github.git] / configure.ac
index 255f75b..ae960fa 100644 (file)
@@ -1,8 +1,8 @@
 dnl Zebra, Index Data ApS, 1995-2006
-dnl $Id: configure.ac,v 1.3 2006-04-20 10:25:17 adam Exp $
+dnl $Id: configure.ac,v 1.16 2006-06-13 14:11:20 adam Exp $
 dnl
 AC_PREREQ(2.59)
-AC_INIT([idzebra],[1.4.0],[adam@indexdata.dk])
+AC_INIT([idzebra],[1.4.1],[adam@indexdata.dk])
 AC_CONFIG_SRCDIR(configure.ac)
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE([1.8])
@@ -34,7 +34,7 @@ else
 fi
 dnl
 dnl ------ YAZ
-YAZ_INIT($yazflag,2.1.9)
+YAZ_INIT($yazflag,2.1.20)
 YAZ_DOC
 dnl ----- libXSLT
 AC_SUBST(XSLT_LIBS)
@@ -265,6 +265,9 @@ if test "$bits" = "64"; then
 else
        AC_MSG_RESULT(no)
 fi
+AC_CHECK_SIZEOF([off_t])
+AC_CHECK_SIZEOF([long long])
+AC_CHECK_SIZEOF([long])
 dnl ------ Modules
 AC_SUBST(SHARED_MODULE_LA)
 SHARED_MODULE_LA=""
@@ -284,17 +287,20 @@ AC_DEFUN([ZEBRA_MODULE],[
           fi
         fi
        m=`echo $1|tr .- __`
-       if test "$myen" = "shared"; then
+       if test "$myen" = "no" -o "$myen" = "disabled"; then
+          AC_MSG_RESULT([disabled])
+       elif test "$2" = "disabled"; then
+          AC_MSG_RESULT([disabled])
+          AC_MSG_ERROR([Cannot enable mod-$1 because of missing libs (XML, etc)])
+       elif test "$myen" = "shared"; then
           AC_MSG_RESULT([shared])
           SHARED_MODULE_LA="${SHARED_MODULE_LA} mod-$1.la"
-       elif test "$myen" = "static" -o "$myen" = "yes"; then
+       elif test "$myen" = "static"; then
           AC_MSG_RESULT([static])
           STATIC_MODULE_OBJ="${STATIC_MODULE_OBJ} \$(mod_${m}_la_OBJECTS)"
           STATIC_MODULE_LADD="${STATIC_MODULE_LADD} \$(mod_${m}_la_LADD)"
           modcpp=`echo $1|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`
           AC_DEFINE_UNQUOTED([IDZEBRA_STATIC_$modcpp])
-       elif test "$myen" = "no"; then
-          AC_MSG_RESULT([disabled])
        else
           AC_MSG_RESULT([$myen])
           AC_MSG_ERROR([invalid --enable-mod-$1 value. Use on,off,static or shared])
@@ -305,22 +311,19 @@ ZEBRA_MODULE(text,static,    [  --enable-mod-text       Text filter])
 ZEBRA_MODULE(grs-sgml,static,[  --enable-mod-grs-sgml   Simple SGML/XML filter])
 ZEBRA_MODULE(grs-regx,shared,[  --enable-mod-grs-regx   REGX/TCL filter])
 ZEBRA_MODULE(grs-marc,shared,[  --enable-mod-grs-marc   MARC filter])
-ZEBRA_MODULE(grs-csv,shared, [  --enable-mod-grs-csv    CSV filter])
-ZEBRA_MODULE(grs-danbib,shared,[  --enable-mod-grs-danbib DanBib filter (DBC)])
 ZEBRA_MODULE(safari,shared,  [  --enable-mod-safari Safari filter (DBC)])
 if test "$ac_cv_header_expat_h" = "yes"; then
    def="shared"
 else
-   def="no"
+   def="disabled"
 fi
 ZEBRA_MODULE(grs-xml,[$def], [  --enable-mod-grs-xml    XML filter (Expat based)])
 if test "$XSLT_VER"; then
    def="shared"
 else
-   def="no"
+   def="disabled"
 fi
-ZEBRA_MODULE(xslt,[$def],    [  --enable-mod-xslt       XSLT filter])
-ZEBRA_MODULE(alvis,[$def],   [  --enable-mod-alvis      ALVIS filter])
+ZEBRA_MODULE(alvis,[$def],   [  --enable-mod-alvis      ALVIS filter (Requires libxslt)])
 dnl ------ ANSI C Header files
 AC_STDC_HEADERS
 if test "$ac_cv_header_stdc" = "no"; then
@@ -347,12 +350,9 @@ AC_OUTPUT([
   include/Makefile include/idzebra/Makefile
   tab/Makefile
   doc/Makefile
-  doc/zebra.xml
+  doc/local.ent
   doc/common/Makefile
-  doc/common/html.dsl
-  doc/common/html.xsl
   doc/common/print.dsl
-  doc/common/tkl.xsl
   test/Makefile test/gils/Makefile test/usmarc/Makefile test/api/Makefile
   test/xslt/Makefile
   test/xpath/Makefile
@@ -365,13 +365,56 @@ AC_OUTPUT([
   test/espec/Makefile
   test/filters/Makefile
   examples/Makefile examples/gils/Makefile examples/zthes/Makefile
-  examples/marc21/Makefile examples/alvis-oai/Makefile
+  examples/marc21/Makefile examples/marcxml/Makefile 
+  examples/alvis-oai/Makefile
   idzebra.spec
   idzebra-config
   Doxyfile
 ],[sed s%idzebra_echo_source=yes%idzebra_echo_source=no%g < idzebra-config > util/idzebra-config && chmod +x idzebra-config util/idzebra-config])
+
+
+echo \ '
+Build and install binaries with the usual
+  make
+  make check
+  make install
+
+Build distribution tarball with
+  make dist
+
+Verify distribution tarball with
+  make distcheck
+
+Or just build the Debian packages without configuring
+  dpkg-buildpackage -rfakeroot
+'
+
 if test  -z "$YAZLIB"; then
        echo "YAZ was not found. Use --with-yaz=DIR to specify location."
        test -f /etc/debian_version && echo "Debian package libyaz-dev is required."
 fi
 
+echo \
+"------------------------------------------------------------------------
+
+  ZEBRA Package:              ${PACKAGE}
+  ZEBRA Version:              ${VERSION}
+  Source code location:       ${srcdir}
+  C Preprocessor:             ${CPP}
+  C Preprocessor flags:       ${CPPFLAGS}
+  C Compiler:                 ${CC}
+  C Compiler flags:           ${CFLAGS}
+  Linker flags:               ${LDFLAGS}
+  Linked libs:                ${LIBS}
+  Host System Type:           ${host}
+  Install path:               ${prefix}
+  Automake:                   ${AUTOMAKE}
+  Archiver:                   ${AR}
+  Ranlib:                     ${RANLIB}
+  YAZ Version:                ${YAZVERSION}
+  YAZ Include:                ${YAZINC}
+  YAZ La Lib:                 ${YAZLALIB}
+  YAZ Lib:                    ${YAZLIB}
+  Bugreport:                  ${PACKAGE_BUGREPORT}
+
+------------------------------------------------------------------------"