1
dnl The standard setup for how we build Pandora projects
3
AC_DEFUN([PANDORA_CANONICAL_TARGET],[
6
PCT_IGNORE_SHARED_PTR=no
17
PCT_IGNORE_SHARED_PTR=yes
22
# We need to prevent canonical target
23
# from injecting -O2 into CFLAGS - but we won't modify anything if we have
24
# set CFLAGS on the command line, since that should take ultimate precedence
25
AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],
27
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],
32
AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects)
33
AS_IF([test "x${PCT_USE_GNULIB}" = "xyes"], [
38
AC_REQUIRE([AC_PROG_CC])
40
dnl Force dependency tracking on for Sun Studio builds
41
AS_IF([test "x${enable_dependency_tracking}" = "x"],[
42
enable_dependency_tracking=yes
46
dnl Once we can use a modern autoconf, we can use this
52
gl_USE_SYSTEM_EXTENSIONS
57
PANDORA_CHECK_CXX_STANDARD
58
AS_IF([test "$PCT_REQUIRE_CXX" = "yes"],[
59
AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
60
AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
65
AS_IF([test "$PCT_IGNORE_SHARED_PTR" = no],[
66
AS_IF([test "$ac_cv_shared_ptr_namespace" = "missing"],[
67
AC_MSG_WARN([a usable shared_ptr implementation was not found. Let someone know what your platform is.])
71
AS_IF([test "x${PCT_USE_GNULIB}" = "xyes"], [
72
dnl TODO: replace this run-time test with an m4 compile-time test
88
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
89
PANDORA_CHECK_C_VERSION
90
PANDORA_CHECK_CXX_VERSION
98
PANDORA_WARNINGS($PCT_ALL_ARGS)
102
PANDORA_ENABLE_DTRACE
103
PANDORA_HEADER_ASSERT
105
AC_CHECK_PROGS([DOXYGEN], [doxygen])
106
AC_CHECK_PROGS([PERL], [perl])
108
AS_IF([test "x${gl_LIBOBJS}" != "x"],[
109
AS_IF([test "$GCC" = "yes"],[
110
AM_CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${AM_CPPFLAGS}"
112
AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}"
116
AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}"
117
AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
118
AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
120
AC_SUBST([AM_CFLAGS])
121
AC_SUBST([AM_CXXFLAGS])
122
AC_SUBST([AM_CPPFLAGS])