home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnufind.zip / configure.in < prev    next >
Text File  |  1994-10-18  |  2KB  |  90 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(find/pred.c)
  3. AC_CONFIG_HEADER(config.h)
  4.  
  5. AC_SUBST(INCLUDES)dnl
  6. AC_ARG_ENABLE(id-cache,
  7. [  --enable-id-cache       cache all UIDs & GIDs; avoid if using NIS or Hesiod],
  8.   AC_DEFINE(CACHE_IDS))
  9. AC_ARG_WITH(afs,
  10. [  --with-afs              support -fstype afs],
  11. [  AC_DEFINE(AFS)
  12.   CPPFLAGS="$CPPFLAGS -I/usr/afsws/include"
  13.   LIBS="$LIBS -L/usr/afsws/lib -L/usr/afsws/lib/afs -lsys -lrx -llwp"])
  14. AC_ARG_PROGRAM
  15.  
  16. dnl Checks for programs.
  17. AC_PROG_CC
  18. AC_PROG_CPP
  19. AC_PROG_INSTALL
  20. AC_PROG_RANLIB
  21. AC_PROG_MAKE_SET
  22.  
  23. dnl Try to get a POSIX.1 environment.
  24. AC_AIX
  25. AC_MINIX
  26. AC_ISC_POSIX
  27.  
  28. dnl Checks for libraries.
  29. AC_CHECK_LIB(sun, getpwnam)
  30.  
  31. dnl Checks for header files.
  32. AC_CHECK_HEADERS(fcntl.h string.h limits.h unistd.h)
  33. AC_HEADER_STDC
  34. AC_HEADER_MAJOR
  35. AC_HEADER_DIRENT
  36. AC_HEADER_STAT
  37. AC_HEADER_SYS_WAIT
  38.  
  39. AC_MSG_CHECKING(how to get filesystem type)
  40. fstype=no
  41. # The order of these tests is important.
  42. AC_TRY_CPP([#include <sys/statvfs.h>
  43. #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
  44. if test $fstype = no; then
  45. AC_TRY_CPP([#include <sys/statfs.h>
  46. #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
  47. fi
  48. if test $fstype = no; then
  49. AC_TRY_CPP([#include <sys/statfs.h>
  50. #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
  51. fi
  52. if test $fstype = no; then  
  53. AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
  54. fi
  55. if test $fstype = no; then  
  56. AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
  57. fi
  58. if test $fstype = no; then  
  59. AC_TRY_CPP([#include <sys/mount.h>
  60. #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
  61. fi
  62. AC_MSG_RESULT($fstype)
  63.  
  64. dnl Checks for typedefs, structures, and compiler characteristics.
  65.  
  66. AC_TYPE_UID_T
  67. AC_TYPE_SIZE_T
  68. AC_TYPE_PID_T
  69. AC_CHECK_TYPE(ino_t, unsigned long)
  70. AC_CHECK_TYPE(dev_t, unsigned long)
  71. AC_STRUCT_ST_BLOCKS
  72. AC_STRUCT_ST_RDEV
  73. AC_STRUCT_TM
  74. AC_STRUCT_TIMEZONE
  75. AC_C_CONST
  76.  
  77. dnl Checks for library functions.
  78.  
  79. AC_REPLACE_FUNCS(memcmp memset mktime stpcpy strdup strftime strspn strstr strtol)
  80. AC_CHECK_FUNCS(fchdir getcwd strerror)
  81. AC_FUNC_STRFTIME
  82. AC_FUNC_VPRINTF
  83. AC_FUNC_ALLOCA
  84. AC_FUNC_GETMNTENT
  85. AC_FUNC_CLOSEDIR_VOID
  86.  
  87. AC_OUTPUT(Makefile lib/Makefile find/Makefile xargs/Makefile \
  88. locate/Makefile doc/Makefile testsuite/Makefile,
  89.   date > stamp-h)
  90.