summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-10-06 18:28:18 -0400
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-10-07 17:17:49 +0200
commit0aa54a0a9848ddfe0eb49bdae8d27703c0a7a33b (patch)
treeed499d82f1c7059961ca13cc4e177ea39461deb0 /configure.ac
parent7e4e25fcd257d77b8356c67f3756fb78516067ba (diff)
build: sanitize environment for AC_CHECK_LIB
Compiling with -Wl,--as-needed can cause the check for gbm_bo_get_stride() to wrongly fail. Sanitize the environment further, assuring that unneeded compiler flags are not involved in the conftest. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 31424bd..19780be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -478,8 +478,10 @@ AM_CONDITIONAL([BUILD_ENABLE_GLES2], [test x$gles2_enabled = xyes])
if test x$have_gbm = xyes ; then
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GBM_CFLAGS $DRM_CFLAGS"
- LIBS="$LIBS $GBM_LIBS $DRM_LIBS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$DRM_CFLAGS $GBM_CFLAGS"
+ LIBS="$DRM_LIBS $GBM_LIBS"
+ LDFLAGS=""
AC_CHECK_LIB([gbm],
[gbm_bo_get_stride],
[AC_DEFINE([BUILD_HAVE_GBM_BO_GET_STRIDE],
@@ -487,6 +489,7 @@ if test x$have_gbm = xyes ; then
[Define to 1 if your libgbm provides gbm_bo_get_stride])])
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
+ LDFLAGS="$save_LDFLAGS"
fi
#