2004-12-23 15:16:30 +02:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2011-05-16 01:38:31 +03:00
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_SRCDIR([Makefile.am])
|
2010-09-10 02:28:20 +03:00
|
|
|
AM_INIT_AUTOMAKE(cmph, 1.0)
|
2011-05-16 01:38:31 +03:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2010-09-10 01:51:03 +03:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2004-12-23 15:16:30 +02:00
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
2011-05-16 01:38:31 +03:00
|
|
|
LT_INIT
|
2005-01-19 14:40:22 +02:00
|
|
|
AC_SYS_EXTRA_LARGEFILE
|
|
|
|
if test "x$ac_cv_sys_largefile_CFLAGS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_CFLAGS=""
|
|
|
|
fi
|
|
|
|
if test "x$ac_cv_sys_largefile_LDFLAGS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_LDFLAGS=""
|
|
|
|
fi
|
|
|
|
if test "x$ac_cv_sys_largefile_LIBS" = "xno" ; then
|
|
|
|
ac_cv_sys_largefile_LIBS=""
|
|
|
|
fi
|
2012-05-28 07:39:36 +03:00
|
|
|
CFLAGS="$ac_cv_sys_largefile_CFLAGS $CFLAGS"
|
2012-04-15 06:03:00 +03:00
|
|
|
LDFLAGS="$ac_cv_sys_largefile_LDFLAGS $LDFLAGS"
|
2005-01-19 14:40:22 +02:00
|
|
|
LIBS="$LIBS $ac_cv_sys_largefile_LIBS"
|
|
|
|
|
2004-12-23 15:16:30 +02:00
|
|
|
dnl Checks for headers
|
|
|
|
AC_CHECK_HEADERS([getopt.h math.h])
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
2011-05-16 01:38:31 +03:00
|
|
|
LT_LIB_M
|
2004-12-23 15:16:30 +02:00
|
|
|
LDFLAGS="$LIBM $LDFLAGS"
|
2012-05-28 07:39:36 +03:00
|
|
|
CFLAGS="-Wall"
|
2004-12-23 15:16:30 +02:00
|
|
|
|
2011-05-16 01:38:31 +03:00
|
|
|
AC_PROG_CXX
|
2012-05-28 07:39:36 +03:00
|
|
|
CXXFLAGS="-Wall -Wno-unused-function -DNDEBUG -O3 -fomit-frame-pointer $CXXFLAGS"
|
2011-05-16 01:38:31 +03:00
|
|
|
AC_ENABLE_CXXMPH
|
|
|
|
if test x$cxxmph = xtrue; then
|
2011-11-05 14:27:24 +02:00
|
|
|
AC_COMPILE_STDCXX_0X
|
|
|
|
if test x$ac_cv_cxx_compile_cxx0x_native = "xno"; then
|
|
|
|
if test x$ac_cv_cxx_compile_cxx0x_cxx = "xyes"; then
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++0x"
|
|
|
|
elif test x$ac_cv_cxx_compile_cxx0x_gxx = "xyes"; then
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=gnu++0x"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR("cxxmph demands a working c++0x compiler.")
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AC_SUBST([CXXMPH], "cxxmph")
|
2011-05-16 01:38:31 +03:00
|
|
|
fi
|
2004-12-23 15:16:30 +02:00
|
|
|
|
2012-06-02 02:06:21 +03:00
|
|
|
PKG_CHECK_MODULES([CHECK], [check >= 0.9.8])
|
|
|
|
if test "x$CHECK_LIBS" = "x" ; then
|
|
|
|
AC_MSG_WARN([Testing library not found, make check will fail.])
|
|
|
|
fi
|
|
|
|
AC_SUBST(CHECK_LIBS)
|
|
|
|
AC_SUBST(CHECK_CFLAGS)
|
|
|
|
|
2005-01-19 14:40:22 +02:00
|
|
|
AC_CHECK_SPOON
|
2011-05-16 01:38:31 +03:00
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile cxxmph/Makefile tests/Makefile examples/Makefile man/Makefile cmph.pc])
|
|
|
|
AC_OUTPUT
|