configure.in 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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.13)
  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 regex.h getopt.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_HEADER_SSTREAM
  43. AC_NAMESPACE
  44. AC_IOS_BINARY
  45. AC_OPEN_MASK
  46. AC_LANG_C
  47. AC_ARG_WITH(platform,
  48. [ --with-platform=platform Set the $[PLATFORM] predefined variable.])
  49. if test "${with_platform-no}" != "no"; then
  50. PLATFORM=$with_platform
  51. else
  52. case "$host_os" in
  53. irix*) PLATFORM=Irix;;
  54. linux*) PLATFORM=Linux;;
  55. cygwin*) PLATFORM=Cygwin;;
  56. *) echo "Cannot determine platform; use --with-platform=name."
  57. exit 1;;
  58. esac
  59. fi
  60. if test "$PLATFORM" = "Cygwin"; then
  61. AC_DEFINE(HAVE_CYGWIN, 1, [Define if we're compiling with Cygwin.])
  62. fi
  63. AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM",
  64. [The platform ppremake is compiled for. This primarily controls the
  65. initial setting of the PLATFORM ppremake variable.])
  66. AC_OUTPUT(Makefile)