summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac85
1 files changed, 51 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac
index b67c0953..5b1e746f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,11 +3,9 @@
dnl the gi version number
m4_define(gi_major_version, 1)
-m4_define(gi_minor_version, 34)
-m4_define(gi_micro_version, 2)
-dnl If set, leave this empty after bumping gi_micro_version
-m4_define(gi_oops_version, )
-m4_define(gi_version, [gi_major_version.gi_minor_version.gi_micro_version]m4_ifval(gi_oops_version, .gi_oops_version))
+m4_define(gi_minor_version, 37)
+m4_define(gi_micro_version, 6)
+m4_define(gi_version, gi_major_version.gi_minor_version.gi_micro_version)
AC_PREREQ([2.63])
AC_INIT([gobject-introspection],
@@ -39,6 +37,7 @@ AM_CONDITIONAL(OS_WIN32, [test "x$os_win32" = "xyes"])
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
+AC_PROG_MKDIR_P
# Initialize libtool
LT_PREREQ([2.2])
@@ -125,31 +124,25 @@ GIR_DIR="$EXPANDED_DATADIR/$GIR_SUFFIX"
AC_SUBST(GIR_DIR)
AC_DEFINE_UNQUOTED(GIR_DIR, "$GIR_DIR", [Director prefix for gir installation])
-PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.34.1])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36.0])
PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
PKG_CHECK_MODULES(GIO, [gio-2.0])
PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false)
AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue)
-AC_ARG_ENABLE(tests,
- AS_HELP_STRING([--disable-tests], [disable test libraries]),
- enable_tests=$enableval,
- enable_tests=maybe)
+# Prefer cairo-gobject if we have it
+AC_ARG_WITH(cairo,
+ AS_HELP_STRING([--with-cairo], [Use cairo @<:@default=maybe@:>@]),
+ [], [with_cairo=maybe])
-AS_IF([test x${enable_tests} != xno], [
+AS_IF([test x${with_cairo} != xno], [
PKG_CHECK_MODULES(CAIRO, [cairo cairo-gobject], have_cairo=yes, have_cairo=no)
- AS_IF([test x$have_cairo != xyes], [
- AS_IF([ test x$enable_tests = xmaybe ], [
- enable_tests=no
- ], [
- AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo])
- ])
- ], [
- enable_tests=yes
+ AS_IF([ test x$have_cairo = xno && test x$with_cairo = xyes ], [
+ AC_MSG_ERROR([cairo enabled but not found])
])
])
-AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno)
+AM_CONDITIONAL(HAVE_CAIRO, test x$have_cairo = xyes)
case "$host" in
*-*-darwin*)
@@ -254,7 +247,7 @@ AC_CHECK_FUNCS([memchr strchr strspn strstr strtol strtoull])
AC_CHECK_FUNCS([backtrace backtrace_symbols])
# Python
-AM_PATH_PYTHON([2.5])
+AM_PATH_PYTHON([2.6])
case "$host" in
*-*-mingw*)
# Change backslashes to forward slashes in pyexecdir to avoid
@@ -269,10 +262,16 @@ fi
dnl Not enabled by default until 3.6 cycle when we can propose mako as
dnl an external dependency
-AC_ARG_ENABLE(doctool,[ --enable-doctool enable g-ir-doctool ], enable_doctool=$enableval,enable_doctool=no)
-if test x$enable_doctool != xno; then
- AM_CHECK_PYMOD(mako,,,[AC_MSG_ERROR(Could not find python module: mako)])
-fi
+AC_ARG_ENABLE(doctool,[ --disable-doctool disable g-ir-doctool ],,enable_doctool=auto)
+AS_IF([ test x$enable_doctool != xno], [
+ AM_CHECK_PYMOD(mako,,have_python_mako=yes,have_python_mako=no)
+])
+AS_IF([ test x$enable_doctool = xauto && test x$have_python_mako = xyes ],
+ [ enable_doctool=yes ],
+ [ test x$enable_doctool = xauto && test x$have_python_mako = xno ],
+ [ enable_doctool=no ],
+ [ test x$enable_doctool = xyes && test x$have_python_mako = xno ],
+ [ AC_MSG_ERROR([Python mako module not found]) ])
AM_CONDITIONAL(BUILD_DOCTOOL, test x$enable_doctool != xno)
# Glib documentation
@@ -288,7 +287,28 @@ AM_CONDITIONAL(WITH_GLIBSRC, test x"$GLIBSRC" != x)
AC_SUBST(GLIBSRC)
AC_MSG_RESULT([$GLIBSRC])
+dnl
+dnl Check for -Bsymbolic-functions linker flag used to avoid
+dnl intra-library PLT jumps, if available.
+dnl
+AC_ARG_ENABLE(Bsymbolic,
+ [AS_HELP_STRING([--disable-Bsymbolic],
+ [avoid linking with -Bsymbolic])],,
+ [SAVED_LDFLAGS="${LDFLAGS}"
+ AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
+ LDFLAGS=-Wl,-Bsymbolic-functions
+ AC_TRY_LINK([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ enable_Bsymbolic=yes,
+ AC_MSG_RESULT(no)
+ enable_Bsymbolic=no)
+ LDFLAGS="${SAVED_LDFLAGS}"])
+
+if test "x${enable_Bsymbolic}" = "xyes"; then
+ EXTRA_LINK_FLAGS=-Wl,-Bsymbolic-functions
+fi
+AC_SUBST(EXTRA_LINK_FLAGS)
AC_CONFIG_FILES([
Makefile
@@ -298,16 +318,13 @@ tests/offsets/Makefile
tests/scanner/Makefile
tests/repository/Makefile
tests/warn/Makefile
-tests/doctool/Makefile
docs/Makefile
docs/reference/Makefile
gobject-introspection-1.0.pc
-gobject-introspection-no-export-1.0.pc])
+gobject-introspection-no-export-1.0.pc
+config.h.win32
+build/Makefile
+build/win32/Makefile
+build/win32/vs9/Makefile
+build/win32/vs10/Makefile])
AC_OUTPUT
-
-echo "
- gobject-introspection $VERSION
- ===============
-
- tests: ${enable_tests}
-"