blob: 2e0d64bd71770c59dcf0320efbb98e625f739736 [file] [log] [blame]
dnl Process this file with autoconf to produce a configure script
AC_INIT(PlatformSupport/PlatformSupportDefinitions.hpp)
dnl Checks for programs
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
dnl Checks for libraries
AC_CHECK_LIB(m, floor)
# Check for gcc problems
if test "$CXX" = "g++" -o "$CXX" = "c++"; then
AC_MSG_CHECKING([whether -fno-elide-constructors works correctly])
old_cxxflags=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-elide-constructors"
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([#include <vector>],
[],
[AC_MSG_RESULT([yes])],
CXXFLAGS=$old_cxxflags
[AC_MSG_RESULT([no])]);
fi
dnl
dnl Do not know how to use this macro, so comment it out.
dnl
dnl special pthread handling (AIX uses pthreads instead of pthread)
dnl AC_CHECK_LIB(pthread, pthread_create)
dnl if test $ac_cv_lib_pthread_pthread_create = no; then
dnl AC_CHECK_LIB(pthreads, pthread_create)
dnl fi
dnl
dnl Determine the host system and Makefile fragment
AC_CANONICAL_HOST
dnl Platform-specific Makefile setup
case "${host}" in
*-*-solaris*) platform=SOLARIS ;;
*-*-linux*) platform=LINUX ;;
*-*-irix*) platform=IRIX ;;
*-*-aix*) platform=AIX ;;
*-*-hp*) platform=HPUX ;
case "${host}" in
*-*-hpux11*) osver=HPUX11;;
*-*-hpux10*) osver=HPUX10;;
*) osver=HPUX11;;
esac;;
*-*-mvs*) platform=OS390 ;;
*-*-osf*) platform=TRU64 ;;
*-apple-darwin*) platform=MACOSX ;;
*) platform=UNKNOWN ;;
esac
AC_SUBST(platform)
cxx=${CXX}
AC_SUBST(cxx)
cc=${CC}
AC_SUBST(cc)
AC_SUBST(prefix)
AC_SUBST(osver)
cxxflags=${CXXFLAGS}
AC_SUBST(cxxflags)
cppflags=${CPPFLAGS}
AC_SUBST(cppflags)
cflags=${CFLAGS}
AC_SUBST(cflags)
ldflags=${LDFLAGS}
AC_SUBST(ldflags)
libs=${LIBS}
AC_SUBST(libs)
transcoder=${TRANSCODER}
AC_SUBST(transcoder)
threads=${THREADS}
AC_SUBST(threads)
bitstobuild=${BITSTOBUILD}
AC_SUBST(bitstobuild)
dnl output the Makefiles
+AC_OUTPUT([Makefile])