dnl Process this file with autoconf to produce a configure script. AC_INIT(ppremake.cxx) AM_INIT_AUTOMAKE(ppremake, 1.02) AM_CONFIG_HEADER(config.h) AC_PREFIX_DEFAULT(/usr/local/panda) AC_PROG_MAKE_SET AC_CANONICAL_HOST # If we have a CFLAGS variable but not a CXXFLAGS variable, let them # be the same. if test "${CXXFLAGS+set}" != set -a "${CFLAGS+set}" = set; then CXXFLAGS=$CFLAGS fi # Save these variables for later, so we can easily append to them or # change them. user_ldflags=${LDFLAGS-} user_cflags=${CFLAGS-} user_cxxflags=${CXXFLAGS-} dnl Checks for programs. AC_PROG_CC AC_PROG_CXX dnl First, we'll test for C-specific features. AC_LANG_C dnl Checks for libraries. libdl= libm= AC_CHECK_LIB(m, sin, libm=-lm) AC_SUBST(libm) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(malloc.h alloca.h unistd.h io.h minmax.h sys/types.h string.h regex.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. AC_CHECK_FUNCS(getopt) dnl Now we can test some C++-specific features. AC_LANG_CPLUSPLUS AC_HEADER_IOSTREAM AC_NAMESPACE AC_LANG_C AC_ARG_WITH(platform, [ --with-platform=platform Set the $[PLATFORM] predefined variable.]) if test "${with_platform-no}" != "no"; then PLATFORM=$with_platform else case "$host_os" in irix*) PLATFORM=Irix;; linux*) PLATFORM=Linux;; cygwin*) PLATFORM=Win32;; *) echo "Cannot determine platform; use --with-platform=name." exit 1;; esac fi if test "$PLATFORM" = "Win32"; then AC_DEFINE(PLATFORM_WIN32) fi AC_DEFINE_UNQUOTED(PLATFORM, "$PLATFORM") AC_OUTPUT(Makefile)