Towards 2.0.4
[idzebra-moved-to-github.git] / configure.ac
index 923be76..8728649 100644 (file)
@@ -1,20 +1,27 @@
 dnl Zebra, Index Data ApS, 1995-2006
-dnl $Id: configure.ac,v 1.17 2006-06-13 14:25:32 adam Exp $
+dnl $Id: configure.ac,v 1.34 2006-10-16 11:03:47 adam Exp $
 dnl
 AC_PREREQ(2.59)
-AC_INIT([idzebra],[1.4.1],[adam@indexdata.dk])
+AC_INIT([idzebra],[2.0.4],[adam@indexdata.dk])
 AC_CONFIG_SRCDIR(configure.ac)
 AC_CONFIG_AUX_DIR(config)
 AM_INIT_AUTOMAKE([1.8])
+PACKAGE_SUFFIX="-2.0"
+AC_SUBST(PACKAGE_SUFFIX)
+dnl http://www.gnu.org/software/libtool/manual.html#Versioning
+ZEBRALIBS_VERSION_INFO=0:1:0
+AC_SUBST(ZEBRALIBS_VERSION_INFO)
+main_zebralib=index/libidzebra${PACKAGE_SUFFIX}.la
+AC_SUBST(main_zebralib)
 dnl ------ Substitutions
 AC_SUBST(TCL_INCLUDE)
 AC_SUBST(TCL_LIB)
 AC_SUBST(READLINE_LIBS)
+AC_SUBST(ZEBRA_CFLAGS)
 dnl
 dnl ------ Checking programs
 AC_PROG_CC
 AC_PROG_CPP
-AM_DISABLE_SHARED
 AM_PROG_LIBTOOL
 dnl
 dnl ------ headers
@@ -34,7 +41,7 @@ else
 fi
 dnl
 dnl ------ YAZ
-YAZ_INIT($yazflag,2.1.20)
+YAZ_INIT($yazflag,2.1.35)
 if test "$YAZVERSION" = "NONE"; then
     AC_MSG_ERROR([YAZ development libraries required])
 fi
@@ -111,8 +118,12 @@ if test -r ${tclconfig}/tclConfig.sh; then
     SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
     SHLIB_VERSION=$TCL_SHLIB_VERSION
     AC_MSG_RESULT($TCL_VERSION)
-    AC_DEFINE(HAVE_TCL_H,1)
-    
+
+    old_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="${TCL_INCLUDE} $CPPFLAGS"
+    AC_CHECK_HEADERS(tcl.h)
+    CPPFLAGS=${old_CPPFLAGS}
+
     # The Mac OSX -framework causes problems with Libtool
     # and dependancy libs.. so apply Tcl libs everywhere bug #461
     case $host in
@@ -126,7 +137,7 @@ else
     AC_DEFINE(HAVE_TCL_H,0)
 fi
 dnl
-dnl ------ mkstemp
+dnl ------ various functions
 AC_CHECK_FUNCS(mkstemp)
 dnl
 dnl ------ GNU Readline
@@ -245,9 +256,8 @@ int main(int argc, char **argv)
        if (sizeof(off_t) != 8) 
                exit (1);
        o = 2000000000;
-       sprintf (tmp_str, "%Ld", o+o+o);
-       if (strcmp (tmp_str, "6000000000"))
-               exit (1);
+       if ((o+o+o) / 3 != o)
+               exit(1);
        fd = creat ("config.tmp", 0644);
        if (fd < 0)
                exit (1);
@@ -269,7 +279,8 @@ else
 fi
 AC_CHECK_SIZEOF([off_t])
 AC_CHECK_SIZEOF([long long])
-AC_CHECK_SIZEOF([long])
+ZEBRA_CFLAGS="-DZEBRA_ZINT=${ac_cv_sizeof_long_long}"
+AC_DEFINE_UNQUOTED(ZEBRA_ZINT,${ac_cv_sizeof_long_long})
 dnl ------ Modules
 AC_SUBST(SHARED_MODULE_LA)
 SHARED_MODULE_LA=""
@@ -347,7 +358,6 @@ AC_OUTPUT([
   isamc/Makefile
   rset/Makefile
   data1/Makefile
-  recctrl/Makefile
   index/Makefile
   include/Makefile include/idzebra/Makefile
   tab/Makefile
@@ -370,9 +380,9 @@ AC_OUTPUT([
   examples/marc21/Makefile examples/marcxml/Makefile 
   examples/alvis-oai/Makefile
   idzebra.spec
-  idzebra-config
+  idzebra-config-2.0
   Doxyfile
-],[sed s%idzebra_echo_source=yes%idzebra_echo_source=no%g < idzebra-config > util/idzebra-config && chmod +x idzebra-config util/idzebra-config])
+],[sed s%echo_source=yes%echo_source=no%g < idzebra-config-2.0 > util/idzebra-config-2.0 && chmod +x idzebra-config-2.0 util/idzebra-config-2.0])
 
 echo \
 "------------------------------------------------------------------------
@@ -401,4 +411,5 @@ echo \
 dnl Local Variables:
 dnl mode:shell-script
 dnl sh-indentation:2
+dnl sh-basic-offset: 4
 dnl End: