home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / sarg1221.zip / configure.in < prev    next >
Text File  |  2002-06-13  |  2KB  |  71 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(log.c)
  3. AC_CONFIG_AUX_DIR(cfgaux)
  4.  
  5. LDFLAGS="-g"
  6.  
  7. AC_CANONICAL_HOST
  8.  
  9. AC_ARG_WITH(gcc,
  10. [  --without-gcc           use CC to compile])
  11.  
  12. test -n "$CC" && cc_specified=yes
  13. case ${with_gcc} in
  14.   yes ) CC=gcc ;;
  15. dnl yes ) CC=g++ ;;
  16.   no  ) CC=cc ;;
  17.   *   ) AC_PROG_CC;;
  18. dnl  *   ) AC_PROG_CXX ;;
  19. esac
  20.  
  21. if test "${CC}" = "cc" ; then
  22.    CFLAGS="${CFLAGS} -O -Aa"
  23. fi
  24.  
  25. case "$host" in
  26.    *-solaris*)
  27.    LDFLAGS="${LDFLAGS} -lsocket -lnsl"
  28.    CFLAGS="-DSOLARIS ${CFLAGS}"
  29.    ;;
  30. esac
  31.  
  32. #dnl Checks for programs.
  33. #AC_PROG_CC
  34.  
  35. dnl Check for headers
  36. AC_HEADER_DIRENT
  37. AC_HEADER_STDC
  38.  
  39. AC_CHECK_HEADERS(stdio.h stdlib.h string.h strings.h sys/time.h time.h unistd.h sys/dirent.h dirent.h \
  40.                  sys/socket.h netdb.h arpa/inet.h sys/types.h netinet/in.h sys/stat.h ctype.h)
  41.  
  42. dnl Checks for typedefs, structures, and compiler characteristics.
  43. AC_C_CONST
  44. AC_STRUCT_TM
  45.  
  46. dnl Select bindir
  47. AC_ARG_ENABLE(bindir,
  48. [  --enable-bindir=bindir
  49.                         Select bindir ],
  50. [
  51.     if test "$enableval"; then
  52.         BINDIR=$enableval
  53.     fi
  54. ],[BINDIR="/usr/bin"])
  55. echo "using $BINDIR as the SARG binary"
  56. AC_SUBST(BINDIR)
  57.  
  58. dnl Select sysconfdir
  59. AC_ARG_ENABLE(sysconfdir,
  60. [  --enable-sysconfdir=sysconfdir
  61.                         Select sysconfdir ],
  62. [
  63.     if test "$enableval"; then
  64.         SYSCONFDIR=$enableval
  65.     fi
  66. ],[SYSCONFDIR="/usr/local/sarg"])
  67. echo "using $SYSCONFDIR as the SARG configuration dir"
  68. AC_SUBST(SYSCONFDIR)
  69.  
  70. AC_OUTPUT(Makefile)
  71.