Added structure year and date.
[idzebra-moved-to-github.git] / configure
index de8c8fd..b9e6688 100755 (executable)
--- a/configure
+++ b/configure
@@ -14,9 +14,9 @@ ac_default_prefix=/usr/local
 ac_help="$ac_help
   --with-buildroot        RPM Build root"
 ac_help="$ac_help
-  --with-yazconfig        Path for yaz-config"
+  --with-yazconfig=DIR    yaz-config in DIR (example /home/yaz-1.5)"
 ac_help="$ac_help
-  --with-tclconfig        Path for tclConfig.sh"
+  --with-tclconfig=DIR    tclConfig.sh in DIR"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -951,6 +951,12 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+if test ! -d lib; then
+       mkdir lib
+fi
+if test ! -d bin; then
+       mkdir bin
+fi
 
 # Check whether --with-build-root or --without-build-root was given.
 if test "${with_build_root+set}" = set; then
@@ -973,7 +979,7 @@ if test "x$yazpath" != "xNONE"; then
 else
        for i in ../yaz* ../yaz; do
                if test -d $i; then
-                       if test -r $i/include/yaz/yaz-version.h; then
+                       if test -r $i/yaz-config; then
                                yazconfig=$i/yaz-config
                        fi
                fi
@@ -982,7 +988,7 @@ else
                # Extract the first word of "yaz-config", so it can be a program name with args.
 set dummy yaz-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:986: checking for $ac_word" >&5
+echo "configure:992: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_yazconfig'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1018,7 +1024,7 @@ fi
        fi
 fi
 echo $ac_n "checking for YAZ""... $ac_c" 1>&6
-echo "configure:1022: checking for YAZ" >&5
+echo "configure:1028: checking for YAZ" >&5
 if test -r $yazconfig; then
        . $yazconfig
        echo "$ac_t""$yazconfig" 1>&6
@@ -1041,7 +1047,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6
 # Extract the first word of "tclsh", so it can be a program name with args.
 set dummy tclsh; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1045: checking for $ac_word" >&5
+echo "configure:1051: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1081,9 +1087,9 @@ fi
        tclconfig=${prefix}/lib
        prefix=${saveprefix}
 fi
+echo $ac_n "checking for Tcl""... $ac_c" 1>&6
+echo "configure:1092: checking for Tcl" >&5
 if test -r ${tclconfig}/tclConfig.sh; then
-       echo $ac_n "checking for Tcl""... $ac_c" 1>&6
-echo "configure:1087: checking for Tcl" >&5
        . ${tclconfig}/tclConfig.sh
        if test -r ${tclconfig}/../generic/tcl.h; then
                TCL_INCLUDE=-I${tclconfig}/../generic
@@ -1099,23 +1105,24 @@ echo "configure:1087: checking for Tcl" >&5
         echo "$ac_t""$TCL_VERSION" 1>&6
        ODEFS="-DHAVE_TCL_H=1"
 else
+        echo "$ac_t""Not found" 1>&6
        ODEFS="-DHAVE_TCL_H=0"
 fi
 for ac_hdr in sys/times.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1109: checking for $ac_hdr" >&5
+echo "configure:1116: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1114 "configure"
+#line 1121 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1142,7 +1149,7 @@ fi
 done
 
 echo $ac_n "checking for bzCompressInit in -lbz2""... $ac_c" 1>&6
-echo "configure:1146: checking for bzCompressInit in -lbz2" >&5
+echo "configure:1153: checking for bzCompressInit in -lbz2" >&5
 ac_lib_var=`echo bz2'_'bzCompressInit | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1150,7 +1157,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lbz2  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1154 "configure"
+#line 1161 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -1161,7 +1168,7 @@ int main() {
 bzCompressInit()
 ; return 0; }
 EOF
-if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -1193,17 +1200,17 @@ if test "$ac_cv_lib_bz2_bzCompressInit" = "yes"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1197: checking for $ac_hdr" >&5
+echo "configure:1204: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1202 "configure"
+#line 1209 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1231,12 +1238,12 @@ done
 
 fi
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1235: checking for ANSI C header files" >&5
+echo "configure:1242: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1240 "configure"
+#line 1247 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1244,7 +1251,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1261,7 +1268,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1265 "configure"
+#line 1272 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1279,7 +1286,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1283 "configure"
+#line 1290 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1300,7 +1307,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1304 "configure"
+#line 1311 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1311,7 +1318,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1344,12 +1351,14 @@ EOF
 
        PROGPREFIX=zmbol
        SUBDIR="util bfile dfa dict isams isamc isam rset recctrl index"
+       SUBMAKE="Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isams/Makefile isamc/Makefile isam/Makefile rset/Makefile recctrl/Makefile index/Makefile"
        SUBLIBS="../lib/rset.a ../lib/dict.a ../lib/isams.a ../lib/isam.a\
  ../lib/recctrl.a ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a\
  ../lib/zebrautl.a"
 else
        PROGPREFIX=zebra
        SUBDIR="util bfile dfa dict isams rset recctrl index"
+       SUBMAKE="Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isams/Makefile rset/Makefile recctrl/Makefile index/Makefile"
        SUBLIBS="../lib/rset.a ../lib/dict.a ../lib/isams.a\
  ../lib/recctrl.a ../lib/bfile.a ../lib/dfa.a\
  ../lib/zebrautl.a"
@@ -1357,18 +1366,6 @@ else
 #define ZMBOL 0
 EOF
 
-       if ! test -d isamc; then
-               mkdir isamc
-       fi
-       if ! test -r isamc/Makefile.in; then
-               touch isamc/Makefile.in
-       fi
-       if ! test -d isam; then
-               mkdir isam
-       fi
-       if ! test -r isam/Makefile.in; then
-               touch isam/Makefile.in
-       fi
 fi
 trap '' 1 2 15
 cat > confcache <<\EOF
@@ -1483,7 +1480,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isams/Makefile isam/Makefile isamc/Makefile recctrl/Makefile rset/Makefile index/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "$SUBMAKE" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -1573,7 +1570,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile util/Makefile bfile/Makefile dfa/Makefile dict/Makefile isams/Makefile isam/Makefile isamc/Makefile recctrl/Makefile rset/Makefile index/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"$SUBMAKE"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then