summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-02-23 18:15:29 +0000
committerChris Wilson <cpwilson@src.gnome.org>2007-02-23 18:15:29 +0000
commit39eb40adc143e140be920ba39777780bb06daf1f (patch)
treede052f1dbced2b6d7ffaafe17a4fed8fb932944a
parent728c62c88fd6475ba02f07a36672a26431d1eda0 (diff)
downloadvte-39eb40adc143e140be920ba39777780bb06daf1f.tar.gz
Bug 411276 – SVN trunk compilation error
2007-02-23 Chris Wilson <chris@chris-wilson.co.uk> Bug 411276 – SVN trunk compilation error * configure.in: Ubuntu Edgy appears to have a broken fontconfig-dev package where the function is exported from the library but is missing the corresponding prototypes. So we reorder the determination of the compilation flags before checking for available functions in the hope that the tests will then match the results at compile time. svn path=/trunk/; revision=1734
-rw-r--r--ChangeLog12
-rw-r--r--configure.in192
2 files changed, 110 insertions, 94 deletions
diff --git a/ChangeLog b/ChangeLog
index 07cbbc45..22cf3419 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2007-02-23 Chris Wilson <chris@chris-wilson.co.uk>
+ Bug 411276 – SVN trunk compilation error
+
+ * configure.in:
+ Ubuntu Edgy appears to have a broken fontconfig-dev package
+ where the function is exported from the library but is missing
+ the corresponding prototypes.
+ So we reorder the determination of the compilation flags
+ before checking for available functions in the hope that the
+ tests will then match the results at compile time.
+
+2007-02-23 Chris Wilson <chris@chris-wilson.co.uk>
+
* src/vte.c: (vte_terminal_io_read):
Prevent a deadlock on recursively grabbing the gdk_mutex.
diff --git a/configure.in b/configure.in
index 6c4cb4f2..f17c7c54 100644
--- a/configure.in
+++ b/configure.in
@@ -59,6 +59,104 @@ LIBTOOL_FLAGS='-as-needed'
AC_SUBST([LIBTOOL_FLAGS])
+################################################################################
+# Compilation
+################################################################################
+
+# Save the names of these other libraries.
+OTHERCFLAGS="$X_CFLAGS"
+AC_SUBST(OTHERCFLAGS)
+OTHERLIBS="$LIBS"
+AC_SUBST(OTHERLIBS)
+
+dnl Use lots of warning flags with with gcc and compatible compilers
+dnl Copied from cairo
+AC_DEFUN([VTE_CC_TRY_FLAG], [
+ AC_MSG_CHECKING([whether $CC supports $1])
+
+ vte_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $1"
+
+ AC_COMPILE_IFELSE([ ], [vte_cc_flag=yes], [vte_cc_flag=no])
+ CFLAGS="$vte_save_CFLAGS"
+
+ if test "x$vte_cc_flag" = "xyes"; then
+ ifelse([$2], , :, [$2])
+ else
+ ifelse([$3], , :, [$3])
+ fi
+ AC_MSG_RESULT([$vte_cc_flag])
+])
+
+
+dnl Note: if you change the following variable, the cache is automatically
+dnl skipped and all flags rechecked. So there's no need to do anything
+dnl else. If for any reason you need to force a recheck, just change
+dnl MAYBE_WARN in an ignorable way (like adding whitespace)
+
+MAYBE_WARN="-Wall -Wextra \
+-Wsign-compare -Werror-implicit-function-declaration \
+-Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
+-Waggregate-return -Wcast-align -Wimplicit -Wuninitialised \
+-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
+-Wpacked -Wmissing-format-attribute -Wshadow \
+-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
+-Wdeclaration-after-statement -Wold-style-definition \
+-Wno-missing-field-initializers -Wno-unused-parameter \
+-fno-common"
+
+dnl Other flags you may wish to try: -Wswitch-enum
+
+
+# invalidate cached value if MAYBE_WARN has changed
+if test "x$vte_cv_warn_maybe" != "x$MAYBE_WARN"; then
+ unset vte_cv_warn_cflags
+fi
+AC_CACHE_CHECK([for supported warning flags], vte_cv_warn_cflags, [
+ echo
+ WARN_CFLAGS=""
+
+ # Some warning options are not supported by all versions of
+ # gcc, so test all desired options against the current
+ # compiler.
+ #
+ # Note that there are some order dependencies
+ # here. Specifically, an option that disables a warning will
+ # have no net effect if a later option then enables that
+ # warnings, (perhaps implicitly). So we put some grouped
+ # options (-Wall and -Wextra) up front and the -Wno options
+ # last.
+
+ for W in $MAYBE_WARN; do
+ VTE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
+ done
+
+ vte_cv_warn_cflags=$WARN_CFLAGS
+ vte_cv_warn_maybe=$MAYBE_WARN
+
+ AC_MSG_CHECKING([which warning flags were supported])])
+WARN_CFLAGS=$vte_cv_warn_cflags
+AC_SUBST(WARN_CFLAGS)
+CFLAGS="$CFLAGS $WARN_CFLAGS"
+
+# Enable debugging messages and additional run-time checks.
+AC_ARG_ENABLE(debugging,
+ [AS_HELP_STRING([--enable-debugging],
+ [enable extra debugging checks and logging messages]
+ )],
+ DEBUG=$enableval, DEBUG=no)
+if test "x$DEBUG" != "xno" ; then
+ AC_MSG_RESULT([enabling debug checks and messages])
+ AC_DEFINE(VTE_DEBUG,1,[Enable debugging messages.])
+fi
+
+
+
+################################################################################
+# Core
+################################################################################
+
+
# On some OSs, AC_PATH_XTRA doesn't work right(?), so let the user specify
# X_PRE_LIBS and X_EXTRA_LIBS to add even more libraries, and add -lX11 to
# the list of libraries for grins.
@@ -75,9 +173,6 @@ fi
AC_SUBST([X_CFLAGS X_LIBS])
-################################################################################
-# Core
-################################################################################
# Use all available features under glibc, and disable accidental use of
# deprecated functionality.
@@ -378,97 +473,6 @@ CFLAGS="$savecflags"
CPPFLAGS="$savecppflags"
-################################################################################
-# Compilation
-################################################################################
-
-# Save the names of these other libraries.
-OTHERCFLAGS="$X_CFLAGS"
-AC_SUBST(OTHERCFLAGS)
-OTHERLIBS="$LIBS"
-AC_SUBST(OTHERLIBS)
-
-dnl Use lots of warning flags with with gcc and compatible compilers
-dnl Copied from cairo
-AC_DEFUN([VTE_CC_TRY_FLAG], [
- AC_MSG_CHECKING([whether $CC supports $1])
-
- vte_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $1"
-
- AC_COMPILE_IFELSE([ ], [vte_cc_flag=yes], [vte_cc_flag=no])
- CFLAGS="$vte_save_CFLAGS"
-
- if test "x$vte_cc_flag" = "xyes"; then
- ifelse([$2], , :, [$2])
- else
- ifelse([$3], , :, [$3])
- fi
- AC_MSG_RESULT([$vte_cc_flag])
-])
-
-
-dnl Note: if you change the following variable, the cache is automatically
-dnl skipped and all flags rechecked. So there's no need to do anything
-dnl else. If for any reason you need to force a recheck, just change
-dnl MAYBE_WARN in an ignorable way (like adding whitespace)
-
-MAYBE_WARN="-Wall -Wextra \
--Wsign-compare -Werror-implicit-function-declaration \
--Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
--Waggregate-return -Wcast-align -Wimplicit -Wuninitialised \
--Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
--Wpacked -Wmissing-format-attribute -Wshadow \
--Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
--Wdeclaration-after-statement -Wold-style-definition \
--Wno-missing-field-initializers -Wno-unused-parameter \
--fno-common"
-
-dnl Other flags you may wish to try: -Wswitch-enum
-
-
-# invalidate cached value if MAYBE_WARN has changed
-if test "x$vte_cv_warn_maybe" != "x$MAYBE_WARN"; then
- unset vte_cv_warn_cflags
-fi
-AC_CACHE_CHECK([for supported warning flags], vte_cv_warn_cflags, [
- echo
- WARN_CFLAGS=""
-
- # Some warning options are not supported by all versions of
- # gcc, so test all desired options against the current
- # compiler.
- #
- # Note that there are some order dependencies
- # here. Specifically, an option that disables a warning will
- # have no net effect if a later option then enables that
- # warnings, (perhaps implicitly). So we put some grouped
- # options (-Wall and -Wextra) up front and the -Wno options
- # last.
-
- for W in $MAYBE_WARN; do
- VTE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
- done
-
- vte_cv_warn_cflags=$WARN_CFLAGS
- vte_cv_warn_maybe=$MAYBE_WARN
-
- AC_MSG_CHECKING([which warning flags were supported])])
-WARN_CFLAGS=$vte_cv_warn_cflags
-AC_SUBST(WARN_CFLAGS)
-CFLAGS="$CFLAGS $WARN_CFLAGS"
-
-# Enable debugging messages and additional run-time checks.
-AC_ARG_ENABLE(debugging,
- [AS_HELP_STRING([--enable-debugging],
- [enable extra debugging checks and logging messages]
- )],
- DEBUG=$enableval, DEBUG=no)
-if test "x$DEBUG" != "xno" ; then
- AC_MSG_RESULT([enabling debug checks and messages])
- AC_DEFINE(VTE_DEBUG,1,[Enable debugging messages.])
-fi
-
wcs_funcs_includes="
#ifdef HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H