Added CCL support for WIN32.
[yaz-moved-to-github.git] / configure
index 7d53d14..25ba5c6 100755 (executable)
--- a/configure
+++ b/configure
@@ -24,9 +24,9 @@ ac_help="$ac_help
 ac_help="$ac_help
   --disable-comp          use old encoders, i.e. disable the YAZ ASN.1 Compiler"
 ac_help="$ac_help
-  --enable-tcpd           enable TCP wrapper for server if available"
+  --enable-tcpd[=PREFIX]  enable TCP wrapper for server if available"
 ac_help="$ac_help
-  --disable-threads       disable threads"
+  --enable-threads        enable POSIX threads"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -1628,31 +1628,34 @@ if test "$enable_comp" = "yes"; then
        ILLMODULE="ill"
        ILLLIB=../ill/libill.la
        ASN_MAKEFILES="z39.50/Makefile ill/Makefile"
-       HFILE=z-proto.h
+       HFILE=${srcdir}/include/yaz/z-proto.h
 else
        ILLMODULE=""
        ASNMODULE=asn
        ILLLIB=""
        ASN_MAKEFILES="asn/Makefile"
-       HFILE=prt-proto.h
+       HFILE=${srcdir}/asn/prt-proto.h
 fi
 echo $ac_n "checking whether proto.h needs to be generated""... $ac_c" 1>&6
 echo "configure:1641: checking whether proto.h needs to be generated" >&5
 yaz_include=${srcdir}/include/yaz
-if test -r ${yaz_include}/proto.h && cmp -s ${yaz_include}/$HFILE ${yaz_include}/proto.h; then
+if test -r ${yaz_include}/proto.h && cmp -s $HFILE ${yaz_include}/proto.h; then
        echo "$ac_t""no" 1>&6
 else
        echo "$ac_t""yes" 1>&6
-       cp -f ${yaz_include}/$HFILE ${yaz_include}/proto.h
+       cp -f $HFILE ${yaz_include}/proto.h
+       if test "$enable_comp" != "yes"; then
+               cp ${srcdir}/asn/*.h ${yaz_include}
+       fi
 fi
 checkBoth=0
 echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1651: checking for connect" >&5
+echo "configure:1654: checking for connect" >&5
 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1656 "configure"
+#line 1659 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -1675,7 +1678,7 @@ connect();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -1696,7 +1699,7 @@ fi
 
 if test "$ac_cv_func_connect" = "no"; then
        echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:1700: checking for main in -lsocket" >&5
+echo "configure:1703: checking for main in -lsocket" >&5
 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1704,14 +1707,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lsocket  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1711 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1718: \"$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
@@ -1737,12 +1740,12 @@ if test "$checkBoth" = "1"; then
        oldLibs=$LIBS
        LIBS="$LIBS -lsocket -lnsl"
        echo $ac_n "checking for accept""... $ac_c" 1>&6
-echo "configure:1741: checking for accept" >&5
+echo "configure:1744: checking for accept" >&5
 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1746 "configure"
+#line 1749 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char accept(); below.  */
@@ -1765,7 +1768,7 @@ accept();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_accept=yes"
 else
@@ -1787,12 +1790,12 @@ fi
 
 fi
 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1791: checking for gethostbyname" >&5
+echo "configure:1794: checking for gethostbyname" >&5
 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1796 "configure"
+#line 1799 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -1815,7 +1818,7 @@ gethostbyname();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -1833,7 +1836,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:1837: checking for main in -lnsl" >&5
+echo "configure:1840: checking for main in -lnsl" >&5
 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1841,14 +1844,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lnsl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1845 "configure"
+#line 1848 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:1852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1855: \"$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
@@ -1872,7 +1875,7 @@ fi
 
 READLINE_LIBS=""
 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:1876: checking for readline in -lreadline" >&5
+echo "configure:1879: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1880,7 +1883,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1884 "configure"
+#line 1887 "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
@@ -1891,7 +1894,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:1895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1898: \"$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
@@ -1913,7 +1916,7 @@ fi
 
 if test "$ac_cv_lib_readline_readline" = "no"; then
        echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
-echo "configure:1917: checking for readline in -lreadline" >&5
+echo "configure:1920: checking for readline in -lreadline" >&5
 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1921,7 +1924,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lreadline  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1925 "configure"
+#line 1928 "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
@@ -1932,7 +1935,7 @@ int main() {
 readline()
 ; return 0; }
 EOF
-if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1939: \"$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
@@ -1954,7 +1957,7 @@ fi
 
 fi
 echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
-echo "configure:1958: checking for add_history in -lhistory" >&5
+echo "configure:1961: checking for add_history in -lhistory" >&5
 ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1962,7 +1965,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lhistory  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1966 "configure"
+#line 1969 "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
@@ -1973,7 +1976,7 @@ int main() {
 add_history()
 ; return 0; }
 EOF
-if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1980: \"$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
@@ -1998,17 +2001,17 @@ if test "$ac_cv_lib_readline_readline" = "yes"; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2002: checking for $ac_hdr" >&5
+echo "configure:2005: 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 2007 "configure"
+#line 2010 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2015: \"$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*
@@ -2035,15 +2038,15 @@ fi
 done
 
 fi
-for ac_func in vsnprintf
+for ac_func in vsnprintf gettimeofday
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2042: checking for $ac_func" >&5
+echo "configure:2045: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2047 "configure"
+#line 2050 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2066,7 +2069,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2096,16 +2099,21 @@ if test "${enable_tcpd+set}" = set; then
   :
 fi
 
-if test "$enable_tcpd" = "yes"; then
-       echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
-echo "configure:2102: checking for working tcpd.h" >&5
+if test "$enable_tcpd" != ""; then
        oldLibs=$LIBS
+       oldCPPFLAGS=$CPPFLAGS
+       if test "$enable_tcpd" != "yes"; then
+               LIBS="$LIBS -L$enable_tcpd/lib"
+               CPPFLAGS="$CPPFLAGS -I$enable_tcpd/include"
+       fi
+       echo $ac_n "checking for working tcpd.h""... $ac_c" 1>&6
+echo "configure:2111: checking for working tcpd.h" >&5
        LIBS="$LIBS -lwrap -lnsl"
        cat > conftest.$ac_ext <<EOF
-#line 2106 "configure"
+#line 2114 "configure"
 #include "confdefs.h"
 #include <syslog.h>
-       #include <tcpd.h>
+#include <tcpd.h>
        int allow_severity = LOG_INFO;
        int deny_severity = LOG_WARNING;
 int main() {
@@ -2113,7 +2121,7 @@ struct request_info request_info; int i;
        i = hosts_access(&request_info);
 ; return 0; }
 EOF
-if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   tcpd_ok=1
 else
@@ -2126,6 +2134,7 @@ rm -f conftest*
        if test "$tcpd_ok" = "0"; then
                echo "$ac_t""no" 1>&6
                LIBS=$oldLibs
+               CPPFLAGS=$oldCPPFLAGS
        else
                echo "$ac_t""yes" 1>&6
                cat >> confdefs.h <<\EOF
@@ -2135,12 +2144,12 @@ EOF
        fi
 fi
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2139: checking for ANSI C header files" >&5
+echo "configure:2148: 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 2144 "configure"
+#line 2153 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2148,7 +2157,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2161: \"$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*
@@ -2165,7 +2174,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 2169 "configure"
+#line 2178 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2183,7 +2192,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 2187 "configure"
+#line 2196 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2204,7 +2213,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2208 "configure"
+#line 2217 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2215,7 +2224,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -2246,12 +2255,12 @@ if test "${enable_threads+set}" = set; then
   enableval="$enable_threads"
   enable_threads=$enableval
 else
-  enable_threads=yes
+  enable_threads=no
 fi
 
 if test "$enable_threads" = "yes"; then
        echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:2255: checking for main in -lpthread" >&5
+echo "configure:2264: checking for main in -lpthread" >&5
 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2259,14 +2268,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2263 "configure"
+#line 2272 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2279: \"$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
@@ -2294,9 +2303,9 @@ else
 fi
 
        echo $ac_n "checking for working POSIX Threads""... $ac_c" 1>&6
-echo "configure:2298: checking for working POSIX Threads" >&5
+echo "configure:2307: checking for working POSIX Threads" >&5
        cat > conftest.$ac_ext <<EOF
-#line 2300 "configure"
+#line 2309 "configure"
 #include "confdefs.h"
 #include <pthread.h>
        int func(void *p) { return 0; }
@@ -2307,7 +2316,7 @@ int main() {
        int r = pthread_create (&pthread_id, 0, func, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:2311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   thread_ok=yes
 else
@@ -2331,8 +2340,14 @@ EOF
                echo "$ac_t""no" 1>&6
        fi
 fi
+
+YAZ_SRC_ROOT=`pwd`
 SUBDIRS_VAR="util odr $ASNMODULE $ILLMODULE zutil comstack ccl tab retrieval server include lib client ztest"
 
+if test -f lib/yaz-config.in; then
+       rm lib/yaz-config.in
+fi
+sed s%yaz_echo_source=yes%yaz_echo_source=no%g < yaz-config.in >lib/yaz-config.in
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -2446,7 +2461,28 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "
+Makefile
+util/Makefile
+odr/Makefile
+z39.50/Makefile
+asn/Makefile
+ill/Makefile
+zutil/Makefile
+comstack/Makefile
+ccl/Makefile
+tab/Makefile
+retrieval/Makefile
+server/Makefile
+include/Makefile
+include/yaz/Makefile
+lib/Makefile
+client/Makefile
+ztest/Makefile
+doc/Makefile
+yaz-config
+lib/yaz-config
+" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -2510,6 +2546,7 @@ s%@LIBTOOL@%$LIBTOOL%g
 s%@ASNMODULE@%$ASNMODULE%g
 s%@ILLMODULE@%$ILLMODULE%g
 s%@ILLLIB@%$ILLLIB%g
+s%@YAZ_SRC_ROOT@%$YAZ_SRC_ROOT%g
 s%@SUBDIRS_VAR@%$SUBDIRS_VAR%g
 
 CEOF
@@ -2552,7 +2589,27 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile util/Makefile odr/Makefile z39.50/Makefile asn/Makefile ill/Makefile zutil/Makefile comstack/Makefile ccl/Makefile tab/Makefile retrieval/Makefile server/Makefile include/Makefile include/yaz/Makefile lib/Makefile client/Makefile ztest/Makefile doc/Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile
+util/Makefile
+odr/Makefile
+z39.50/Makefile
+asn/Makefile
+ill/Makefile
+zutil/Makefile
+comstack/Makefile
+ccl/Makefile
+tab/Makefile
+retrieval/Makefile
+server/Makefile
+include/Makefile
+include/yaz/Makefile
+lib/Makefile
+client/Makefile
+ztest/Makefile
+doc/Makefile
+yaz-config
+lib/yaz-config
+"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -2616,7 +2673,7 @@ cat >> $CONFIG_STATUS <<EOF
 
 EOF
 cat >> $CONFIG_STATUS <<\EOF
-
+chmod +x yaz-config lib/yaz-config
 exit 0
 EOF
 chmod +x $CONFIG_STATUS