home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / f / find37.zip / find-3.7 / configure < prev    next >
Text File  |  1992-07-20  |  17KB  |  744 lines

  1. #!/bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf.
  4. # Copyright (C) 1991, 1992 Free Software Foundation, Inc.
  5.  
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10.  
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. # GNU General Public License for more details.
  15.  
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
  21. #        [--prefix=PREFIX] [--exec_prefix=PREFIX] [--with-PROGRAM] [TARGET]
  22. # Ignores all args except --srcdir, --prefix, --exec_prefix, and --no-create.
  23.  
  24. trap 'rm -f conftest* core; exit 1' 1 3 15
  25.  
  26. for arg
  27. do
  28.   # Handle --exec_prefix with a space before the argument.
  29.   if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  30.   # Handle --host with a space before the argument.
  31.   elif test x$next_host = xyes; then next_host=
  32.   # Handle --prefix with a space before the argument.
  33.   elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  34.   # Handle --srcdir with a space before the argument.
  35.   elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  36.   else
  37.     case $arg in
  38.      -exec_prefix=* | --exec_prefix=* | --exec_prefi=* | --exec_pref=* | --exec_pre=* | --exec_pr=* | --exec_p=* | --exec_=* | --exec=* | --exe=* | --ex=* | --e=*)
  39.     exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  40.      -exec_prefix | --exec_prefix | --exec_prefi | --exec_pref | --exec_pre | --exec_pr | --exec_p | --exec_ | --exec | --exe | --ex | --e)
  41.     next_exec_prefix=yes ;;
  42.  
  43.      -gas | --gas | --ga | --g) ;;
  44.  
  45.      -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  46.      -host | --host | --hos | --ho | --h)
  47.     next_host=yes ;;
  48.  
  49.      -nfp | --nfp | --nf) ;;
  50.  
  51.      -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
  52.         no_create=1 ;;
  53.  
  54.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  55.     prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  56.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  57.     next_prefix=yes ;;
  58.  
  59.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  60.     srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  61.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  62.     next_srcdir=yes ;;
  63.  
  64.      -with-* | --with-*) ;;
  65.  
  66.      *) ;;
  67.     esac
  68.   fi
  69. done
  70.  
  71. rm -f conftest*
  72. compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  73.  
  74. # A filename unique to this package, relative to the directory that
  75. # configure is in, which we can look for to find out if srcdir is correct.
  76. unique_file=find/pred.c
  77.  
  78. # Find the source files, if location was not specified.
  79. if test -z "$srcdir"; then
  80.   srcdirdefaulted=yes; srcdir=.
  81.   if test ! -r $unique_file; then srcdir=..; fi
  82. fi
  83. if test ! -r $srcdir/$unique_file; then
  84.   if test x$srcdirdefaulted = xyes; then
  85.     echo "configure: Can not find sources in \`.' or \`..'." 1>&2
  86.   else
  87.     echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  88.   fi
  89.   exit 1
  90. fi
  91. # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  92. # But we can't avoid them for `..', to make subdirectories work.
  93. case $srcdir in
  94.   .|/*|~*) ;;
  95.   *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  96. esac
  97.  
  98. if test -z "$CC"; then
  99.   echo checking for gcc
  100.   saveifs="$IFS"; IFS="${IFS}:"
  101.   for dir in $PATH; do
  102.     test -z "$dir" && dir=.
  103.     if test -f $dir/gcc; then
  104.       CC="gcc"
  105.       break
  106.     fi
  107.   done
  108.   IFS="$saveifs"
  109. fi
  110. test -z "$CC" && CC="cc"
  111.  
  112. # Find out if we are using GNU C, under whatever name.
  113. cat <<EOF > conftest.c
  114. #ifdef __GNUC__
  115.   yes
  116. #endif
  117. EOF
  118. ${CC-cc} -E conftest.c > conftest.out 2>&1
  119. if egrep yes conftest.out >/dev/null 2>&1; then
  120.   GCC=1 # For later tests.
  121.   CC="$CC -O"
  122. fi
  123. rm -f conftest*
  124.  
  125. echo checking how to run the C preprocessor
  126. if test -z "$CPP"; then
  127.   CPP='${CC-cc} -E'
  128.   cat <<EOF > conftest.c
  129.  
  130. #include <stdio.h>
  131. EOF
  132. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  133. if test -z "$err"; then
  134.   :
  135. else
  136.   CPP=/lib/cpp
  137. fi
  138. rm -f conftest*
  139. fi
  140.  
  141. # Make sure to not get the incompatible SysV /etc/install and
  142. # /usr/sbin/install, which might be in PATH before a BSD-like install,
  143. # or the SunOS /usr/etc/install directory.
  144. if test -z "$INSTALL"; then
  145.   echo checking for install
  146.   saveifs="$IFS"; IFS="${IFS}:"
  147.   for dir in $PATH; do
  148.     test -z "$dir" && dir=.
  149.     case $dir in
  150.     /etc|/usr/sbin|/usr/etc) ;;
  151.     *)
  152.       if test -f $dir/install; then
  153.     INSTALL="$dir/install -c"
  154.     INSTALL_PROGRAM='$(INSTALL)'
  155.     INSTALL_DATA='$(INSTALL) -m 644'
  156.     break
  157.       fi
  158.       ;;
  159.     esac
  160.   done
  161.   IFS="$saveifs"
  162. fi
  163. INSTALL=${INSTALL-cp}
  164. INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
  165. INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
  166.  
  167. if test -z "$RANLIB"; then
  168.   echo checking for ranlib
  169.   saveifs="$IFS"; IFS="${IFS}:"
  170.   for dir in $PATH; do
  171.     test -z "$dir" && dir=.
  172.     if test -f $dir/ranlib; then
  173.       RANLIB="ranlib"
  174.       break
  175.     fi
  176.   done
  177.   IFS="$saveifs"
  178. fi
  179. test -z "$RANLIB" && RANLIB="@:"
  180.  
  181. echo checking for AIX
  182. cat <<EOF > conftest.c
  183.  
  184. #ifdef _AIX
  185.   yes
  186. #endif
  187.  
  188. EOF
  189. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  190. if egrep "yes" conftest.out >/dev/null 2>&1; then
  191.   DEFS="$DEFS -D_ALL_SOURCE=1"
  192. fi
  193. rm -f conftest*
  194.  
  195.  
  196. echo checking for minix/config.h
  197. cat <<EOF > conftest.c
  198.  
  199. #include <minix/config.h>
  200. EOF
  201. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  202. if test -z "$err"; then
  203.   MINIX=1
  204. fi
  205. rm -f conftest*
  206.  
  207. # The Minix shell can't assign to the same variable on the same line!
  208. if test -n "$MINIX"; then
  209.   DEFS="$DEFS -D_POSIX_SOURCE=1"
  210.   DEFS="$DEFS -D_POSIX_1_SOURCE=2"
  211.   DEFS="$DEFS -D_MINIX=1"
  212. fi
  213.  
  214. echo checking for POSIXized ISC
  215. if test -d /etc/conf/kconfig.d &&
  216.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  217. then
  218.   ISC=1 # If later tests want to check for ISC.
  219.   DEFS="$DEFS -D_POSIX_SOURCE=1"
  220.   if test -n "$GCC"; then
  221.     CC="$CC -posix"
  222.   else
  223.     CC="$CC -Xp"
  224.   fi
  225. fi
  226.  
  227. echo checking for SCO UNIX libintl
  228. cat <<EOF > conftest.c
  229.  
  230. #if defined(M_UNIX)
  231.   yes
  232. #endif
  233.  
  234. EOF
  235. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  236. if egrep "yes" conftest.out >/dev/null 2>&1; then
  237.   SCO_UNIX=1
  238. fi
  239. rm -f conftest*
  240.  
  241. test -n "$SCO_UNIX" && test -f /lib/libintl.a &&
  242.   LIBS="$LIBS -lintl" # For strftime.
  243.  
  244. echo checking for limits.h
  245. cat <<EOF > conftest.c
  246.  
  247. #include <limits.h>
  248. EOF
  249. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  250. if test -z "$err"; then
  251.   DEFS="$DEFS -DHAVE_LIMITS_H=1"
  252. fi
  253. rm -f conftest*
  254.  
  255. echo checking for major, minor and makedev header
  256. echo "#include <sys/types.h>
  257. main() { exit(0); } t() { return makedev(0, 0); }" > conftest.c
  258. if eval $compile; then
  259.   makedev=1
  260. fi
  261. rm -f conftest*
  262.  
  263. if test -z "$makedev"; then
  264. echo checking for sys/mkdev.h
  265. cat <<EOF > conftest.c
  266.  
  267. #include <sys/mkdev.h>
  268. EOF
  269. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  270. if test -z "$err"; then
  271.   DEFS="$DEFS -DMAJOR_IN_MKDEV=1" makedev=1
  272. fi
  273. rm -f conftest*
  274.  
  275. fi
  276. if test -z "$makedev"; then
  277. echo checking for sys/sysmacros.h
  278. cat <<EOF > conftest.c
  279.  
  280. #include <sys/sysmacros.h>
  281. EOF
  282. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  283. if test -z "$err"; then
  284.   DEFS="$DEFS -DMAJOR_IN_SYSMACROS=1"
  285. fi
  286. rm -f conftest*
  287.  
  288. fi
  289.  
  290. echo checking for directory library header
  291. echo checking for dirent.h
  292. cat <<EOF > conftest.c
  293.  
  294. #include <dirent.h>
  295. EOF
  296. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  297. if test -z "$err"; then
  298.   DEFS="$DEFS -DDIRENT=1" dirheader=dirent.h
  299. fi
  300. rm -f conftest*
  301.  
  302. if test -z "$dirheader"; then
  303. echo checking for sys/ndir.h
  304. cat <<EOF > conftest.c
  305.  
  306. #include <sys/ndir.h>
  307. EOF
  308. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  309. if test -z "$err"; then
  310.   DEFS="$DEFS -DSYSNDIR=1" dirheader=sys/ndir.h
  311. fi
  312. rm -f conftest*
  313.  
  314. fi
  315. if test -z "$dirheader"; then
  316. echo checking for sys/dir.h
  317. cat <<EOF > conftest.c
  318.  
  319. #include <sys/dir.h>
  320. EOF
  321. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  322. if test -z "$err"; then
  323.   DEFS="$DEFS -DSYSDIR=1" dirheader=sys/dir.h
  324. fi
  325. rm -f conftest*
  326.  
  327. fi
  328.  
  329. echo checking for closedir return value
  330. cat <<EOF > conftest.c
  331. #include <sys/types.h>
  332. #include <$dirheader>
  333. int closedir(); main() { exit(0); }
  334. EOF
  335. eval $compile
  336. if test -s conftest && (./conftest 2>/dev/null) 2>/dev/null; then
  337.   :
  338. else
  339.   DEFS="$DEFS -DVOID_CLOSEDIR=1"
  340. fi
  341. rm -f conftest*
  342.  
  343. echo checking how to get filesystem type
  344. # SVR4.
  345. cat <<EOF > conftest.c
  346.  
  347. #include <sys/statvfs.h>
  348. #include <sys/fstyp.h>
  349. EOF
  350. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  351. if test -z "$err"; then
  352.   DEFS="$DEFS -DFSTYPE_STATVFS=1" fstype=1
  353. fi
  354. rm -f conftest*
  355. if test -z "$fstype"; then
  356. # SVR3.
  357. cat <<EOF > conftest.c
  358.  
  359. #include <sys/statfs.h>
  360. #include <sys/fstyp.h>
  361. EOF
  362. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  363. if test -z "$err"; then
  364.   DEFS="$DEFS -DFSTYPE_USG_STATFS=1" fstype=1
  365. fi
  366. rm -f conftest*
  367. fi
  368. if test -z "$fstype"; then
  369. # AIX.
  370. cat <<EOF > conftest.c
  371.  
  372. #include <sys/statfs.h>
  373. #include <sys/vmount.h>
  374. EOF
  375. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  376. if test -z "$err"; then
  377.   DEFS="$DEFS -DFSTYPE_AIX_STATFS=1" fstype=1
  378. fi
  379. rm -f conftest*
  380. fi
  381. if test -z "$fstype"; then  
  382. # 4.3BSD.
  383. cat <<EOF > conftest.c
  384.  
  385. #include <mntent.h>
  386. EOF
  387. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  388. if test -z "$err"; then
  389.   DEFS="$DEFS -DFSTYPE_MNTENT=1" fstype=1
  390. fi
  391. rm -f conftest*
  392. fi
  393. if test -z "$fstype"; then  
  394. # 4.4BSD.  Also reportedly DEC OSF/1.
  395. echo '#include <sys/mount.h>' > conftest.c
  396. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  397. if egrep "MOUNT_UFS" conftest.out >/dev/null 2>&1; then
  398.   DEFS="$DEFS -DFSTYPE_STATFS=1"
  399. fi
  400. rm -f conftest*
  401.  
  402. fi
  403. if test -z "$fstype"; then  
  404. # Ultrix.
  405. cat <<EOF > conftest.c
  406.  
  407. #include <sys/mount.h>
  408. #include <sys/fs_types.h>
  409. EOF
  410. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  411. if test -z "$err"; then
  412.   DEFS="$DEFS -DFSTYPE_GETMNT=1" fstype=1
  413. fi
  414. rm -f conftest*
  415. fi
  416.  
  417. echo checking for ANSI C header files
  418. cat <<EOF > conftest.c
  419.  
  420. #include <stdlib.h>
  421. #include <stdarg.h>
  422. #include <string.h>
  423. #include <limits.h>
  424. EOF
  425. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  426. if test -z "$err"; then
  427.   DEFS="$DEFS -DSTDC_HEADERS=1"
  428. fi
  429. rm -f conftest*
  430.  
  431. echo checking for unistd.h
  432. cat <<EOF > conftest.c
  433.  
  434. #include <unistd.h>
  435. EOF
  436. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  437. if test -z "$err"; then
  438.   DEFS="$DEFS -DHAVE_UNISTD_H=1"
  439. fi
  440. rm -f conftest*
  441.  
  442. echo checking for BSD string and memory functions
  443. echo "#include <strings.h>
  444. main() { exit(0); } t() { rindex(0, 0); bzero(0, 0); }" > conftest.c
  445. if eval $compile; then
  446.   :
  447. else
  448.   DEFS="$DEFS -DUSG=1"
  449. fi
  450. rm -f conftest*
  451.  
  452. for func in fnmatch memset stpcpy strdup strftime strspn strstr strtol
  453. do
  454. echo checking for ${func}
  455. echo "
  456. main() { exit(0); } t() { 
  457. /* Override any gcc2 internal prototype to avoid an error.  */
  458. extern char ${func}(); ${func}(); }" > conftest.c
  459. if eval $compile; then
  460.   :
  461. else
  462.   LIBOBJS="$LIBOBJS ${func}.o"
  463. fi
  464. rm -f conftest*
  465.  
  466. done
  467.  
  468. for func in strerror
  469. do
  470. trfrom='[a-z]' trto='[A-Z]'
  471. echo checking for ${func}
  472. echo "
  473. main() { exit(0); } t() { 
  474. /* Override any gcc2 internal prototype to avoid an error.  */
  475. extern char ${func}(); ${func}(); }" > conftest.c
  476. if eval $compile; then
  477.   DEFS="$DEFS -DHAVE_`echo $func|tr "$trfrom" "$trto"`=1"
  478. fi
  479. rm -f conftest*
  480. done
  481.  
  482. echo checking for vprintf
  483. echo "
  484. main() { exit(0); } t() { vprintf(); }" > conftest.c
  485. if eval $compile; then
  486.   DEFS="$DEFS -DHAVE_VPRINTF=1"
  487. else
  488.   vprintf_missing=1
  489. fi
  490. rm -f conftest*
  491.  
  492. if test -n "$vprintf_missing"; then
  493. echo checking for _doprnt
  494. echo "
  495. main() { exit(0); } t() { _doprnt(); }" > conftest.c
  496. if eval $compile; then
  497.   DEFS="$DEFS -DHAVE_DOPRNT=1"
  498. fi
  499. rm -f conftest*
  500.  
  501. fi
  502.  
  503. echo checking for alloca.h
  504. cat <<EOF > conftest.c
  505.  
  506. #include <alloca.h>
  507. EOF
  508. err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
  509. if test -z "$err"; then
  510.   DEFS="$DEFS -DHAVE_ALLOCA_H=1"
  511. fi
  512. rm -f conftest*
  513.  
  514. decl="#ifdef __GNUC__
  515. #define alloca __builtin_alloca
  516. #else
  517. #if HAVE_ALLOCA_H
  518. #include <alloca.h>
  519. #else
  520. #ifdef _AIX
  521.  #pragma alloca
  522. #else
  523. char *alloca ();
  524. #endif
  525. #endif
  526. #endif
  527. "
  528. echo checking for alloca
  529. echo "$decl
  530. main() { exit(0); } t() { char *p = (char *) alloca(1); }" > conftest.c
  531. if eval $compile; then
  532.   :
  533. else
  534.   alloca_missing=1
  535. fi
  536. rm -f conftest*
  537.  
  538. if test -n "$alloca_missing"; then
  539.   SAVELIBS="$LIBS"
  540.   # Maybe alloca is in a different library.
  541.   #if test -f /usr/ucblib/libucb.a; then
  542.     # Avoid the broken BSD compatibility library as much as possible.
  543.     #LIBS="$LIBS -L/usr/ucblib -lc -lucb" trylib=-lucb # SVR4
  544.   #el
  545.   if test -f /lib/libPW.a; then
  546.     LIBS="$LIBS -lPW" trylib=-lPW # SVR2 and SVR3
  547.   fi
  548.   if test -n "$trylib"; then
  549.     alloca_missing=
  550.     echo checking for alloca in $trylib
  551. echo "$decl
  552. main() { exit(0); } t() { char *p = (char *) alloca(1); }" > conftest.c
  553. if eval $compile; then
  554.   :
  555. else
  556.   alloca_missing=1
  557. fi
  558. rm -f conftest*
  559.  
  560.   fi
  561.   if test -n "$alloca_missing"; then
  562.     LIBS="$SAVELIBS" ALLOCA=alloca.o
  563.   fi
  564. fi
  565.  
  566. echo checking for st_blocks in struct stat
  567. echo "#include <sys/types.h>
  568. #include <sys/stat.h>
  569. main() { exit(0); } t() { struct stat s; s.st_blocks; }" > conftest.c
  570. if eval $compile; then
  571.   DEFS="$DEFS -DHAVE_ST_BLOCKS=1"
  572. else
  573.   LIBOBJS="$LIBOBJS fileblocks.o"
  574. fi
  575. rm -f conftest*
  576.  
  577. echo checking for st_rdev in struct stat
  578. echo "#include <sys/types.h>
  579. #include <sys/stat.h>
  580. main() { exit(0); } t() { struct stat s; s.st_rdev; }" > conftest.c
  581. if eval $compile; then
  582.   DEFS="$DEFS -DHAVE_ST_RDEV=1"
  583. fi
  584. rm -f conftest*
  585.  
  586. echo checking for struct tm in time.h
  587. echo "#include <sys/types.h>
  588. #include <time.h>
  589. main() { exit(0); } t() { struct tm *tp; }" > conftest.c
  590. if eval $compile; then
  591.   :
  592. else
  593.   DEFS="$DEFS -DTM_IN_SYS_TIME=1"
  594. fi
  595. rm -f conftest*
  596.  
  597. decl='#include <sys/types.h>
  598. '
  599. case "$DEFS" in
  600.   *TM_IN_SYS_TIME*) decl="$decl #include <sys/time.h>
  601. " ;;
  602.   *) decl="$decl #include <time.h>
  603. " ;;
  604. esac
  605. echo checking for tm_zone in struct tm
  606. echo "$decl
  607. main() { exit(0); } t() { struct tm tm; tm.tm_zone; }" > conftest.c
  608. if eval $compile; then
  609.   DEFS="$DEFS -DHAVE_TM_ZONE=1"
  610. else
  611.   no_tm_zone=1
  612. fi
  613. rm -f conftest*
  614.  
  615. if test -n "$no_tm_zone"; then
  616. echo checking for tzname
  617. echo "
  618. main() { exit(0); } t() { extern char **tzname; atoi(*tzname); }" > conftest.c
  619. if eval $compile; then
  620.   DEFS="$DEFS -DHAVE_TZNAME=1"
  621. fi
  622. rm -f conftest*
  623.  
  624. fi
  625.  
  626. echo checking for Xenix
  627. cat <<EOF > conftest.c
  628.  
  629. #if defined(M_XENIX) && !defined(M_UNIX)
  630.   yes
  631. #endif
  632.  
  633. EOF
  634. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  635. if egrep "yes" conftest.out >/dev/null 2>&1; then
  636.   XENIX=1
  637. fi
  638. rm -f conftest*
  639.  
  640. if test -n "$XENIX"; then
  641.   DEFS="$DEFS -DVOID_CLOSEDIR=1"
  642.   LIBS="$LIBS -lx"
  643.   case "$DEFS" in
  644.   *SYSNDIR*) ;;
  645.   *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
  646.   esac
  647. fi
  648.  
  649. echo checking for IRIX libsun
  650. if test -f /usr/lib/libsun.a; then
  651.   LIBS="$LIBS -lsun"
  652. fi
  653.  
  654. echo checking for DYNIX/ptx libseq
  655. cat <<EOF > conftest.c
  656.  
  657. #if defined(_SEQUENT_)
  658.   yes
  659. #endif
  660.  
  661. EOF
  662. eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
  663. if egrep "yes" conftest.out >/dev/null 2>&1; then
  664.   SEQUENT=1
  665. fi
  666. rm -f conftest*
  667.  
  668. test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
  669.   LIBS="$LIBS -lseq"
  670.  
  671. if test -n "$prefix"; then
  672.   test -z "$exec_prefix" && exec_prefix='$(prefix)'
  673.   prsub="s,^prefix[     ]*=.*$,prefix = $prefix,"
  674. fi
  675. if test -n "$exec_prefix"; then
  676.   prsub="$prsub
  677. s,^exec_prefix[     ]*=.*$,exec_prefix = $exec_prefix,"
  678. fi
  679.  
  680. trap 'rm -f config.status; exit 1' 1 3 15
  681. echo creating config.status
  682. rm -f config.status
  683. cat <<EOF > config.status
  684. #!/bin/sh
  685. # Generated automatically by configure.
  686. # Run this file to recreate the current configuration.
  687. # This directory was configured as follows:
  688. # $0 $*
  689.  
  690. case "\$1" in
  691.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  692.   exec /bin/sh $0 $* ;;
  693. esac
  694.  
  695. trap 'rm -f Makefile lib/Makefile find/Makefile xargs/Makefile locate/Makefile man/Makefile; exit 1' 1 3 15
  696. CC='$CC'
  697. CPP='$CPP'
  698. INSTALL='$INSTALL'
  699. INSTALL_PROGRAM='$INSTALL_PROGRAM'
  700. INSTALL_DATA='$INSTALL_DATA'
  701. RANLIB='$RANLIB'
  702. LIBOBJS='$LIBOBJS'
  703. ALLOCA='$ALLOCA'
  704. LIBS='$LIBS'
  705. srcdir='$srcdir'
  706. DEFS='$DEFS'
  707. prefix='$prefix'
  708. exec_prefix='$exec_prefix'
  709. prsub='$prsub'
  710. EOF
  711. cat <<\EOF >> config.status
  712.  
  713. top_srcdir=$srcdir
  714. for file in Makefile lib/Makefile find/Makefile xargs/Makefile locate/Makefile man/Makefile; do
  715.   srcdir=$top_srcdir
  716.   # Remove last slash and all that follows it.  Not all systems have dirname.
  717.   dir=`echo $file|sed 's,/[^/][^/]*$,,'`
  718.   if test "$dir" != "$file"; then
  719.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  720.     test ! -d $dir && mkdir $dir
  721.   fi
  722.   echo creating $file
  723.   rm -f $file
  724.   echo "# Generated automatically from `basename $file`.in by configure." > $file
  725.   sed -e "
  726. $prsub
  727. s,@CC@,$CC,
  728. s,@CPP@,$CPP,
  729. s,@INSTALL@,$INSTALL,
  730. s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,
  731. s,@INSTALL_DATA@,$INSTALL_DATA,
  732. s,@RANLIB@,$RANLIB,
  733. s,@LIBOBJS@,$LIBOBJS,
  734. s,@ALLOCA@,$ALLOCA,
  735. s,@LIBS@,$LIBS,
  736. s,@srcdir@,$srcdir,
  737. s,@DEFS@,$DEFS," $top_srcdir/${file}.in >> $file
  738. done
  739.  
  740. EOF
  741. chmod +x config.status
  742. test -n "$no_create" || ./config.status
  743.  
  744.