home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cproto.zip / cproto46 / configure.in < prev    next >
Text File  |  1998-01-23  |  2KB  |  76 lines

  1. dnl Process this file with 'autoconf' to produce a 'configure' script
  2. dnl $Id: configure.in,v 4.6 1998/01/24 01:42:05 cthuang Exp $
  3. AC_REVISION($Revision: 4.6 $)
  4. AC_INIT(cproto.c)
  5. AC_PROG_CC
  6. AC_PROG_CPP
  7. AC_PROG_LEX
  8. AC_PROG_MAKE_SET
  9. AC_PROG_YACC
  10. AC_PROG_INSTALL
  11. AC_GCC_TRADITIONAL
  12.  
  13. AC_CHECK_PROGS(LINT, [lint alint])
  14. if test -n "$LINT" ; then
  15.     AC_DEFINE(HAVE_PROG_LINT)
  16. fi
  17.  
  18. ###    use option -with-warnings to turn on all gcc warnings
  19. if test -n "$GCC"
  20. then
  21. AC_ARG_WITH(warnings,
  22. [  --with-warnings         use gcc warnings (used for developing this tool)],
  23. [CFLAGS="$CFLAGS -Wall -Wshadow -Wconversion -Wstrict-prototypes -Wmissing-prototypes"])
  24. fi
  25.  
  26. ###    extra things that we'll substitute in the makefile
  27. dnl AC_SUBST(LIBS)
  28. AC_SUBST(EXTRA_OBJS)
  29.  
  30. AC_CONST
  31. AC_STDC_HEADERS
  32. AC_HAVE_HEADERS(stdlib.h unistd.h)
  33. AC_HAVE_HEADERS(getopt.h string.h memory.h)
  34.  
  35. AC_HAVE_FUNCS(strstr tmpfile link unlink mktemp)
  36.  
  37. ###    special configuration tests
  38. TD_SIZE_T
  39. TD_YACC_ERROR
  40. TD_POPEN_TEST
  41.  
  42. ###    debugging/testing
  43. AC_ARG_WITH(trace,
  44. [  --with-trace            use trace.c for memory-testing],[
  45.     AC_HEADER_TIME
  46.     AC_HAVE_FUNCS(gettimeofday)
  47.     AC_DEFINE(DOALLOC,10000)
  48.     EXTRA_OBJS="$EXTRA_OBJS trace.o dump.o"])
  49. AC_ARG_WITH(dmalloc,
  50. [  --with-dmalloc          use Gray Watson's dmalloc],[
  51.     AC_CHECK_LIB(dmalloc,dmalloc_debug)])
  52. AC_ARG_WITH(dbmalloc,
  53. [  --with-dbmalloc         use Conor Cahill's dbmalloc],[
  54.     AC_CHECK_LIB(dbmalloc,debug_malloc)])
  55.  
  56. echo setting other definitions
  57. AC_DEFINE_UNQUOTED(CPP,"$CPP")
  58.  
  59. ###    output makefile and config.h
  60. changequote({,})dnl
  61. AC_OUTPUT(Makefile config_h,
  62. {
  63. echo creating config.h
  64. sed    -e '/^# /d' \
  65.     -e 's/ -D/\
  66. #define /g' \
  67.     -e 's/\(#define [A-Za-z_][A-Za-z0-9_]*\)=/\1    /g' \
  68.     -e 's/\\//g' \
  69.     config_h >config.h
  70. }
  71. echo removing config_h
  72. rm config_h
  73. )
  74. changequote([,])dnl
  75. touch stamp-h
  76.