aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-09-22 19:54:09 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2013-10-02 21:44:06 +0800
commit00a890c8c7f03fd1a7aaeddec09cfa48020f0ad7 (patch)
tree2e08ff448b842a375ff8e02d126afdcc444526cd /configure.ac
parent6990871efd032acec88ae4272be20b1d144c3509 (diff)
configure: use C++ for all tests, kill CFLAGS
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 7 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 21e043af..ea7c592f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,18 +98,18 @@ fi
#
AC_PROG_CXX([g++ c++])
-AC_PROG_CPP
AC_PROG_INSTALL
+AC_LANG(C++)
echo "CXXFLAGS: $CXXFLAGS"
#
# Detect directories which may contain additional headers, libraries
# and commands. This needs to be done early - before Autoconf starts
-# to mess with CFLAGS and all the other environemnt variables.
+# to mess with CXXFLAGS and all the other environemnt variables.
#
# This mostly helps OS X users, since fink usually installs out of
-# tree and doesn't update CFLAGS.
+# tree and doesn't update CXXFLAGS.
#
# It also helps FreeBSD which puts libiconv in /usr/local/lib
@@ -119,7 +119,6 @@ for i in /usr/pkg /sw /opt /opt/local /usr/local; do
if test -d $i/include; then
AC_MSG_RESULT(yes)
CXXFLAGS="$CXXFLAGS -I$i/include/"
- CFLAGS="$CFLAGS -I$i/include/"
else
AC_MSG_RESULT(no)
fi
@@ -329,7 +328,7 @@ if test "$glibc" = yes; then
# fallback.h, in order to keep fish working on non-gnu platforms.
#
- CFLAGS="$CFLAGS -D_GNU_SOURCE=1 -D_ISO99_SOURCE=1"
+ CXXFLAGS="$CXXFLAGS -D_GNU_SOURCE=1 -D_ISO99_SOURCE=1"
else
AC_MSG_RESULT(no)
fi
@@ -606,7 +605,7 @@ AC_CHECK_HEADER(
# conditional definition of __EXTENSIONS__, to avoid redundant tests.
#
-XCFLAGS="$CXXFLAGS"
+XCXXFLAGS="$CXXFLAGS"
echo checking how to use -D_XOPEN_SOURCE=600 and -D_POSIX_C_SOURCE=200112L...
local_found_posix_switch=no
@@ -614,7 +613,7 @@ local_found_posix_switch=no
for i in "" "-D_POSIX_C_SOURCE=200112L" "-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112L"; do
AC_MSG_CHECKING( if switches \"$i\" works)
- CFLAGS="$XCFLAGS $i"
+ CXXFLAGS="$XCXXFLAGS $i"
#
# Try to run this program, which should test various extensions
@@ -688,7 +687,7 @@ done
#
if test ! x$local_found_posix_switch = xyes; then
- CFLAGS="$XCFLAGS"
+ CXXFLAGS="$XCXXFLAGS"
fi