Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

set AC_LANG only once

  • Loading branch information...
commit c40e35d91049ea418af433025aaaee5078e00d4d 1 parent 3a92ea1
@novas0x2a novas0x2a authored
Showing with 8 additions and 16 deletions.
  1. +6 −16 acinclude.m4
  2. +2 −0  configure.ac
View
22 acinclude.m4
@@ -136,13 +136,12 @@ AC_DEFUN([AX_PKG],
AC_MSG_CHECKING([for package $1])
fi
- AC_LANG_SAVE
- AC_LANG(C++)
+ AC_LANG_ASSERT(C++)
# We can skip searching if we're already at "no"
if test "no" = "$HAVE_PKG_$1"; then
AC_MSG_RESULT([no (disabled by user)])
-
+
else
# Test for and inherit libraries from dependencies
if test -z "${FORCE_$1_LDFLAGS}"; then
@@ -284,8 +283,6 @@ AC_DEFUN([AX_PKG],
AC_MSG_NOTICE([ASP_CPPFLAGS= $ASP_CPPFLAGS])
AC_MSG_NOTICE([ASP_LDFLAGS= $ASP_LDFLAGS])
fi
-
- AC_LANG_RESTORE
])
@@ -297,8 +294,7 @@ AC_DEFUN([AX_PKG_BOOST],
AC_MSG_RESULT([])
fi
- AC_LANG_SAVE
- AC_LANG(C++)
+ AC_LANG_ASSERT(C++)
if test -n "${HAVE_PKG_BOOST}" && test "${HAVE_PKG_BOOST}" != "yes" && test "${HAVE_PKG_BOOST}" != "no"; then
PKG_PATHS_BOOST=${HAVE_PKG_BOOST}
@@ -420,7 +416,6 @@ AC_DEFUN([AX_PKG_BOOST],
AC_MSG_RESULT([$HAVE_PKG_BOOST])
fi
- AC_LANG_RESTORE
])
@@ -550,8 +545,7 @@ AC_DEFUN([AX_PKG_BOOST_LIB],
AC_MSG_RESULT([])
fi
- AC_LANG_SAVE
- AC_LANG(C++)
+ AC_LANG_ASSERT(C++)
# Skip testing if the user has overridden
if test -z "${HAVE_PKG_BOOST_$1}"; then
@@ -657,11 +651,8 @@ AC_DEFUN([AX_PKG_BOOST_LIB],
else
AC_MSG_RESULT([${HAVE_PKG_BOOST_$1}])
fi
-
- AC_LANG_RESTORE
])
-
dnl Usage: AX_PKG_PTHREADS
AC_DEFUN([AX_PKG_PTHREADS],
[
@@ -670,8 +661,7 @@ AC_DEFUN([AX_PKG_PTHREADS],
AC_MSG_RESULT([])
fi
- AC_LANG_SAVE
- AC_LANG_C
+ AC_LANG_PUSH(C)
HAVE_PKG_PTHREADS=no
ax_pkg_pthreads_cppflags_options="none -pthread"
@@ -716,7 +706,7 @@ AC_DEFUN([AX_PKG_PTHREADS],
done
done
- AC_LANG_RESTORE
+ AC_LANG_POP(C)
if test "$HAVE_PKG_PTHREADS" = "yes" ; then
CFLAGS="$CFLAGS $PKG_PTHREADS_CPPFLAGS"
View
2  configure.ac
@@ -216,6 +216,8 @@ AX_PROG_AR
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
+AC_LANG(C++)
+
# Qt with AutoTroll.
AT_WITH_QT([+gui +sql +opengl])
Please sign in to comment.
Something went wrong with that request. Please try again.