summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-12-10 12:05:25 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-12-10 12:05:25 +0100
commitda69cdf6227782c957393735ab43c040656d959c (patch)
tree0c3fb833edfaeacb6342e8b9e9fbd34b40910186
parentd065221fda703034619500581b3339b7f3fc7e80 (diff)
Fix 'no-undefined' check.
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 8befd1d..b9fa1bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,17 +73,18 @@ AC_ARG_WITH([debug],
dnl ===========================
dnl Check for -Wl,--no-undefined or -Wl,-undefined,error support
dnl ===========================
+AC_LANG_PUSH([C++])
TMP_CXXFLAGS="$CXXFLAGS"
AC_MSG_CHECKING([whether CXX supports '-Wl,--no-undefined'])
CXXFLAGS="-Wall -Werror -Wl,--no-undefined"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[ AC_MSG_RESULT([yes])
NO_UNDEFINED_PARAM=-Wl,--no-undefined
],
[ AC_MSG_RESULT([no])
AC_MSG_CHECKING([whether CXX supports '-Wl,-undefined,error'])
CXXFLAGS="-Wall -Werror -Wl,-undefined,error"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])
NO_UNDEFINED_PARAM=-Wl,-undefined,error
],
@@ -94,6 +95,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
]
)
CXXFLAGS="$TMP_CXXFLAGS"
+AC_LANG_POP([C++])
dnl ===========================
dnl Set up debug compile args if the user requested it