4
4
dnl with or without modifications, as long as this notice is preserved.
6
6
dnl Which version of the canonical setup we're using
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.95])
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.100])
9
9
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10
10
AC_ARG_ENABLE([fat-binaries],
29
29
ifdef([m4_define],,[define([m4_define], defn([define]))])
30
30
ifdef([m4_undefine],,[define([m4_undefine], defn([undefine]))])
31
31
m4_define([PCT_ALL_ARGS],[$*])
32
m4_define([PCT_USE_GNULIB],[no])
33
32
m4_define([PCT_REQUIRE_CXX],[no])
34
m4_define([PCT_IGNORE_SHARED_PTR],[no])
35
33
m4_define([PCT_FORCE_GCC42],[no])
36
m4_define([PCT_SRC_IN_SRC],[no])
37
34
m4_define([PCT_VERSION_FROM_VC],[no])
38
35
m4_define([PCT_USE_VISIBILITY],[yes])
39
36
m4_foreach([pct_arg],[$*],[
42
m4_undefine([PCT_USE_GNULIB])
43
m4_define([PCT_USE_GNULIB],[yes])
46
39
m4_undefine([PCT_REQUIRE_CXX])
47
40
m4_define([PCT_REQUIRE_CXX],[yes])
49
[ignore-shared-ptr], [
50
m4_undefine([PCT_IGNORE_SHARED_PTR])
51
m4_define([PCT_IGNORE_SHARED_PTR],[yes])
54
43
m4_undefine([PCT_FORCE_GCC42])
55
44
m4_define([PCT_FORCE_GCC42],[yes])
58
47
m4_undefine([PCT_USE_VISIBILITY])
59
48
m4_define([PCT_USE_VISIBILITY],[no])
62
m4_undefine([PCT_SRC_IN_SRC])
63
m4_define([PCT_SRC_IN_SRC],[yes])
65
50
[version-from-vc], [
66
51
m4_undefine([PCT_VERSION_FROM_VC])
67
52
m4_define([PCT_VERSION_FROM_VC],[yes])
56
AC_CONFIG_MACRO_DIR([m4])
58
m4_if(m4_esyscmd(test -d src && echo -n 0),0,[
59
AC_CONFIG_HEADERS([src/config.h])
61
AC_CONFIG_HEADERS([config.h])
71
64
# We need to prevent canonical target
72
65
# from injecting -O2 into CFLAGS - but we won't modify anything if we have
73
66
# set CFLAGS on the command line, since that should take ultimate precedence
81
74
AM_INIT_AUTOMAKE(-Wall -Werror nostdinc subdir-objects foreign)
82
75
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
84
m4_if(PCT_USE_GNULIB,yes,[ gl_EARLY ])
77
m4_if(m4_esyscmd(test -d gnulib && echo -n 0),0,[
86
81
AC_REQUIRE([AC_PROG_CC])
87
82
AC_REQUIRE([PANDORA_MAC_GCC42])
122
m4_if(PCT_IGNORE_SHARED_PTR, [no], [
123
AS_IF([test "$ac_cv_shared_ptr_namespace" = "missing"],[
124
AC_MSG_WARN([a usable shared_ptr implementation was not found. Let someone know what your platform is.])
128
m4_if(PCT_USE_GNULIB, [yes], [
116
m4_if(m4_esyscmd(test -d gnulib && echo -n 0),0,[
130
118
AC_CONFIG_LIBOBJ_DIR([gnulib])
221
209
AC_CHECK_PROGS([DOXYGEN], [doxygen])
222
210
AC_CHECK_PROGS([PERL], [perl])
224
214
AS_IF([test "x${gl_LIBOBJS}" != "x"],[
225
215
AS_IF([test "$GCC" = "yes"],[
226
AM_CPPFLAGS="-isystem \$(top_srcdir)/gnulib -isystem \$(top_builddir)/gnulib ${AM_CPPFLAGS}"
216
AM_CPPFLAGS="-isystem \${top_srcdir}/gnulib -isystem \${top_builddir}/gnulib ${AM_CPPFLAGS}"
228
AM_CPPFLAGS="-I\$(top_srcdir)/gnulib -I\$(top_builddir)/gnulib ${AM_CPPFLAGS}"
218
AM_CPPFLAGS="-I\${top_srcdir}/gnulib -I\${top_builddir}/gnulib ${AM_CPPFLAGS}"
231
AS_IF([test "PCT_SRC_IN_SRC" = "yes"],[
221
m4_if(m4_esyscmd(test -d src && echo -n 0),0,[
232
222
AM_CPPFLAGS="-I\$(top_srcdir)/src -I\$(top_builddir)/src ${AM_CPPFLAGS}"
224
AM_CPPFLAGS="-I\$(top_srcdir) -I\$(top_builddir) ${AM_CPPFLAGS}"
238
AM_CPPFLAGS="-I\${top_srcdir} -I\${top_builddir} ${AM_CPPFLAGS}"
239
230
AM_CFLAGS="${AM_CFLAGS} ${CC_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"
240
231
AM_CXXFLAGS="${AM_CXXFLAGS} ${CXX_WARNINGS} ${CC_PROFILING} ${CC_COVERAGE}"