diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-05 16:38:46 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-06-12 13:39:34 +1000 |
commit | 3627215e97734cc367fff273a3358c2a95a53481 (patch) | |
tree | 6236ecdd69731e5b6e24fd05c12543a54815c0ed | |
parent | 5e0ca6fabd12401de6bd6039484be2079e28851e (diff) |
Add check for GNU ld in the test suite.
The GNU linker supports a -wrap option to wrap function calls at link-time.
This allows for easy overriding of functions in the X server with stubs in
the test suite. This functionality is only supported on the GNU linker and
will be used extensively in the tests. Disable the tests if GNU ld is not
available.
-rw-r--r-- | configure.ac | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index acd988593..126511760 100644 --- a/configure.ac +++ b/configure.ac @@ -1145,11 +1145,19 @@ fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) if test "x$UNITTESTS" = xauto; then - PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], [UNITTESTS=yes], [UNITTESTS=no]) + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16], [HAVE_GLIB=yes], [HAVE_GLIB=no]) + if test "x$HAVE_GLIB" = xyes && test "x$with_gnu_ld" = xyes; then + UNITTESTS=yes + else + UNITTESTS=no + fi fi if test "x$UNITTESTS" = xyes; then AC_DEFINE(UNITTESTS, 1, [Enable unit tests]) PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.16]) + if test "x$with_gnu_ld" = xno; then + AC_MSG_ERROR([GNU ld required to build unit tests]) + fi AC_SUBST([GLIB_LIBS]) AC_SUBST([GLIB_CFLAGS]) fi |