configure.in 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(ppremake.cxx)
  3. dnl **************** UPDATE VERSION NUMBER HERE ****************
  4. dnl ** Also be sure to change the version number **
  5. dnl ** at the end of config_msvc.h. **
  6. dnl **************** ****************
  7. AM_INIT_AUTOMAKE(ppremake, 1.11)
  8. dnl **************** UPDATE VERSION NUMBER HERE ****************
  9. AM_CONFIG_HEADER(config.h)
  10. AC_PREFIX_DEFAULT(/usr/local/panda)
  11. AC_PROG_MAKE_SET
  12. AC_CANONICAL_HOST
  13. # If we have a CFLAGS variable but not a CXXFLAGS variable, let them
  14. # be the same.
  15. if test "${CXXFLAGS+set}" != set -a "${CFLAGS+set}" = set; then
  16. CXXFLAGS=$CFLAGS
  17. fi
  18. # Save these variables for later, so we can easily append to them or
  19. # change them.
  20. user_ldflags=${LDFLAGS-}
  21. user_cflags=${CFLAGS-}
  22. user_cxxflags=${CXXFLAGS-}
  23. dnl Checks for programs.
  24. AC_PROG_CC
  25. AC_PROG_CXX
  26. dnl First, we'll test for C-specific features.
  27. AC_LANG_C
  28. dnl Checks for libraries.
  29. libdl=
  30. libm=
  31. AC_CHECK_LIB(m, sin, libm=-lm)
  32. AC_SUBST(libm)
  33. dnl Checks for header files.
  34. AC_HEADER_STDC
  35. AC_CHECK_HEADERS(malloc.h alloca.h unistd.h utime.h io.h minmax.h dirent.h sys/types.h sys/time.h sys/utime.h sys/wait.h string.h strstream.h regex.h)
  36. dnl Checks for typedefs, structures, and compiler characteristics.
  37. dnl Checks for library functions.
  38. AC_CHECK_FUNCS(getopt)
  39. dnl Now we can test some C++-specific features.
  40. AC_LANG_CPLUSPLUS
  41. AC_HEADER_IOSTREAM
  42. AC_NAMESPACE
  43. AC_LANG_C
  44. AC_ARG_WITH(platform,
  45. [ --with-platform=platform Set the $[PLATFORM] predefined variable.])
  46. if test "${with_platform-no}" != "no"; then
  47. PLATFORM=$with_platform
  48. else
  49. case "$host_os" in
  50. irix*) PLATFORM=Irix;;
  51. linux*) PLATFORM=Linux;;
  52. cygwin*) PLATFORM=Cygwin;;
  53. *) echo "Cannot determine platform; use --with-platform=name."
  54. exit 1;;
  55. esac
  56. fi
  57. if test "$PLATFORM" = "Cygwin"; then
  58. AC_DEFINE(HAVE_CYGWIN)
  59. fi
  60. AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM")
  61. AC_OUTPUT(Makefile)