summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-09-06 21:19:18 (GMT)
committerBrad King <brad.king@kitware.com>2002-09-06 21:19:18 (GMT)
commit29058923349566477620c905c3ac5d150518cedc (patch)
tree6749adb6632309f78afafdf1cbddb81637f898f3
parent41628d2602733993d74a24cc557083a6a007c845 (diff)
downloadCMake-29058923349566477620c905c3ac5d150518cedc.zip
CMake-29058923349566477620c905c3ac5d150518cedc.tar.gz
CMake-29058923349566477620c905c3ac5d150518cedc.tar.bz2
ENH: Improved configure test implementations by using AC_TRY_COMPILE.
-rwxr-xr-xTemplates/cconfigure302
-rw-r--r--Templates/cconfigure.in41
-rwxr-xr-xTemplates/cxxconfigure440
-rw-r--r--Templates/cxxconfigure.in202
-rwxr-xr-xconfigure369
-rw-r--r--configure.in177
6 files changed, 1078 insertions, 453 deletions
diff --git a/Templates/cconfigure b/Templates/cconfigure
index 15c9f10..08c5199 100755
--- a/Templates/cconfigure
+++ b/Templates/cconfigure
@@ -889,6 +889,7 @@ else
#line 890 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -897,7 +898,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -919,7 +920,7 @@ EOF
CMAKE_SIZEOF_INT=$ac_cv_sizeof_int
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:923: checking size of long" >&5
+echo "configure:924: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -927,9 +928,10 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 931 "configure"
+#line 932 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -938,7 +940,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -960,7 +962,7 @@ EOF
CMAKE_SIZEOF_LONG=$ac_cv_sizeof_long
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:964: checking size of void *" >&5
+echo "configure:966: checking size of void *" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -968,9 +970,10 @@ else
ac_cv_sizeof_void_p=4
else
cat > conftest.$ac_ext <<EOF
-#line 972 "configure"
+#line 974 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -979,7 +982,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_void_p=`cat conftestval`
else
@@ -1001,7 +1004,7 @@ EOF
CMAKE_SIZEOF_VOID_P=$ac_cv_sizeof_void_p
echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:1005: checking size of char" >&5
+echo "configure:1008: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1009,9 +1012,10 @@ else
ac_cv_sizeof_char=1
else
cat > conftest.$ac_ext <<EOF
-#line 1013 "configure"
+#line 1016 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -1020,7 +1024,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char=`cat conftestval`
else
@@ -1042,7 +1046,7 @@ EOF
CMAKE_SIZEOF_CHAR=$ac_cv_sizeof_char
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1046: checking size of short" >&5
+echo "configure:1050: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1050,9 +1054,10 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 1054 "configure"
+#line 1058 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -1061,7 +1066,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -1083,7 +1088,7 @@ EOF
CMAKE_SIZEOF_SHORT=$ac_cv_sizeof_short
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:1087: checking size of float" >&5
+echo "configure:1092: checking size of float" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1091,9 +1096,10 @@ else
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
-#line 1095 "configure"
+#line 1100 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -1102,7 +1108,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_float=`cat conftestval`
else
@@ -1124,7 +1130,7 @@ EOF
CMAKE_SIZEOF_FLOAT=$ac_cv_sizeof_float
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:1128: checking size of double" >&5
+echo "configure:1134: checking size of double" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1132,9 +1138,10 @@ else
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 1136 "configure"
+#line 1142 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <sys/types.h>
main()
{
FILE *f=fopen("conftestval", "w");
@@ -1143,7 +1150,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_double=`cat conftestval`
else
@@ -1167,7 +1174,7 @@ CMAKE_SIZEOF_DOUBLE=$ac_cv_sizeof_double
# check for X11 support
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1171: checking how to run the C preprocessor" >&5
+echo "configure:1178: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1182,13 +1189,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1186 "configure"
+#line 1193 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1199,13 +1206,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1203 "configure"
+#line 1210 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1216,13 +1223,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1220 "configure"
+#line 1227 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1251,7 +1258,7 @@ echo "$ac_t""$CPP" 1>&6
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1255: checking for X" >&5
+echo "configure:1262: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -1313,12 +1320,12 @@ if test "$ac_x_includes" = NO; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1317 "configure"
+#line 1324 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1387,14 +1394,14 @@ if test "$ac_x_libraries" = NO; then
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1391 "configure"
+#line 1398 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
@@ -1500,17 +1507,17 @@ else
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1504: checking whether -R must be followed by a space" >&5
+echo "configure:1511: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1507 "configure"
+#line 1514 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
@@ -1526,14 +1533,14 @@ rm -f conftest*
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 1537 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
@@ -1565,7 +1572,7 @@ rm -f conftest*
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1569: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:1576: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1573,7 +1580,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1577 "configure"
+#line 1584 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1584,7 +1591,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1606,7 +1613,7 @@ fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:1610: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:1617: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1614,7 +1621,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1618 "configure"
+#line 1625 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1625,7 +1632,7 @@ int main() {
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1654,12 +1661,12 @@ fi
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1658: checking for gethostbyname" >&5
+echo "configure:1665: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1663 "configure"
+#line 1670 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
@@ -1682,7 +1689,7 @@ gethostbyname();
; return 0; }
EOF
-if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
@@ -1703,7 +1710,7 @@ fi
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1707: checking for gethostbyname in -lnsl" >&5
+echo "configure:1714: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1711,7 +1718,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1715 "configure"
+#line 1722 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1722,7 +1729,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1752,12 +1759,12 @@ fi
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1756: checking for connect" >&5
+echo "configure:1763: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1768 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
@@ -1780,7 +1787,7 @@ connect();
; return 0; }
EOF
-if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
@@ -1801,7 +1808,7 @@ fi
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1805: checking for connect in -lsocket" >&5
+echo "configure:1812: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1809,7 +1816,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1813 "configure"
+#line 1820 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1820,7 +1827,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1844,12 +1851,12 @@ fi
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:1848: checking for remove" >&5
+echo "configure:1855: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1853 "configure"
+#line 1860 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
@@ -1872,7 +1879,7 @@ remove();
; return 0; }
EOF
-if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
@@ -1893,7 +1900,7 @@ fi
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:1897: checking for remove in -lposix" >&5
+echo "configure:1904: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1901,7 +1908,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1905 "configure"
+#line 1912 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1912,7 +1919,7 @@ int main() {
remove()
; return 0; }
EOF
-if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1936,12 +1943,12 @@ fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:1940: checking for shmat" >&5
+echo "configure:1947: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1945 "configure"
+#line 1952 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
@@ -1964,7 +1971,7 @@ shmat();
; return 0; }
EOF
-if { (eval echo configure:1968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
@@ -1985,7 +1992,7 @@ fi
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:1989: checking for shmat in -lipc" >&5
+echo "configure:1996: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1993,7 +2000,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1997 "configure"
+#line 2004 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2004,7 +2011,7 @@ int main() {
shmat()
; return 0; }
EOF
-if { (eval echo configure:2008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2037,7 +2044,7 @@ fi
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2041: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2048: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2045,7 +2052,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2049 "configure"
+#line 2056 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2056,7 +2063,7 @@ int main() {
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2088,14 +2095,14 @@ fi
# get byte swapping info
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2092: checking whether byte ordering is bigendian" >&5
+echo "configure:2099: checking whether byte ordering is bigendian" >&5
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 2099 "configure"
+#line 2106 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -2106,11 +2113,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 2114 "configure"
+#line 2121 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -2121,7 +2128,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -2141,7 +2148,7 @@ if test "$cross_compiling" = yes; then
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 2145 "configure"
+#line 2152 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -2154,7 +2161,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -2187,17 +2194,17 @@ fi
#
ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2191: checking for limits.h" >&5
+echo "configure:2198: checking for limits.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2196 "configure"
+#line 2203 "configure"
#include "confdefs.h"
#include <limits.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2224,17 +2231,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2228: checking for $ac_hdr" >&5
+echo "configure:2235: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2233 "configure"
+#line 2240 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2268,7 +2275,7 @@ done
# there are a few systems, like Next, where this doesn't work.
echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:2272: checking system version (for dynamic loading)" >&5
+echo "configure:2279: checking system version (for dynamic loading)" >&5
if test -f /usr/lib/NextStep/software_version; then
system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
else
@@ -2338,7 +2345,7 @@ CMAKE_shared_ok="yes"
# Linux can use either -ldl or -ldld for dynamic loading.
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2342: checking for dlopen in -ldl" >&5
+echo "configure:2349: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2346,7 +2353,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2350 "configure"
+#line 2357 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2357,7 +2364,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:2361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2394,7 +2401,7 @@ case $system in
CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
echo $ac_n "checking for printf in -lld""... $ac_c" 1>&6
-echo "configure:2398: checking for printf in -lld" >&5
+echo "configure:2405: checking for printf in -lld" >&5
ac_lib_var=`echo ld'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2402,7 +2409,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2406 "configure"
+#line 2413 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2413,7 +2420,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2521,17 +2528,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2525: checking for dld.h" >&5
+echo "configure:2532: checking for dld.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2530 "configure"
+#line 2537 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2843,17 +2850,17 @@ for ac_hdr in sys/prctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2847: checking for $ac_hdr" >&5
+echo "configure:2854: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2852 "configure"
+#line 2859 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2898,17 +2905,17 @@ for ac_hdr in pthread.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2902: checking for $ac_hdr" >&5
+echo "configure:2909: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2907 "configure"
+#line 2914 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2937,7 +2944,7 @@ done
if test "$use_pthreads" = "yes"; then
if test "$use_sproc" = "no"; then
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:2941: checking for pthread_create in -lpthreads" >&5
+echo "configure:2948: checking for pthread_create in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2945,7 +2952,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2949 "configure"
+#line 2956 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2956,7 +2963,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2977,7 +2984,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2981: checking for pthread_create in -lpthread" >&5
+echo "configure:2988: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2985,7 +2992,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2989 "configure"
+#line 2996 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2996,7 +3003,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3019,7 +3026,7 @@ fi
# Work around Solaris 5.6 and 5.7 bug:
if test "`uname -s -r`" = "SunOS 5.6"; then
echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
-echo "configure:3023: checking for thr_create in -lthread" >&5
+echo "configure:3030: checking for thr_create in -lthread" >&5
ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3027,7 +3034,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3031 "configure"
+#line 3038 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3038,7 +3045,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3061,7 +3068,7 @@ fi
fi
if test "`uname -s -r`" = "SunOS 5.7"; then
echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
-echo "configure:3065: checking for thr_create in -lthread" >&5
+echo "configure:3072: checking for thr_create in -lthread" >&5
ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3069,7 +3076,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3073 "configure"
+#line 3080 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3080,7 +3087,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3142,22 +3149,67 @@ CMAKE_ANSI_CFLAGS=""
if test $ac_cv_prog_gcc = no; then
case $system in
HP-UX-*)
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Aa $CFLAGS"
echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
- else
- echo "$ac_t""no" 1>&6
- fi
+echo "configure:3156: checking whether ${CC} accepts -Aa" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 3158 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ CFLAGS="$CFLAGS_ORIG"
+
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Ae $CFLAGS"
echo $ac_n "checking whether ${CC} accepts -Ae""... $ac_c" 1>&6
- if test -z "`${CC} -Ae -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+echo "configure:3187: checking whether ${CC} accepts -Ae" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 3189 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ CFLAGS="$CFLAGS_ORIG"
;;
esac
fi
@@ -3174,7 +3226,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3178: checking for $ac_word" >&5
+echo "configure:3230: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR_TMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/Templates/cconfigure.in b/Templates/cconfigure.in
index 6edc469..f8f23d1 100644
--- a/Templates/cconfigure.in
+++ b/Templates/cconfigure.in
@@ -595,22 +595,31 @@ CMAKE_ANSI_CFLAGS=""
if test $ac_cv_prog_gcc = no; then
case $system in
HP-UX-*)
- echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking whether ${CC} accepts -Ae""... $ac_c" 1>&6
- if test -z "`${CC} -Ae -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Aa $CFLAGS"
+ AC_MSG_CHECKING([whether ${CC} accepts -Aa])
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ CFLAGS="$CFLAGS_ORIG"
+
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Ae $CFLAGS"
+ AC_MSG_CHECKING([whether ${CC} accepts -Ae])
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ CFLAGS="$CFLAGS_ORIG"
;;
esac
fi
diff --git a/Templates/cxxconfigure b/Templates/cxxconfigure
index 7b23fb5..9e3aac1 100755
--- a/Templates/cxxconfigure
+++ b/Templates/cxxconfigure
@@ -705,16 +705,53 @@ CXXFLAGS=$save_CXXFLAGS
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION=""
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking whether ${CXX} supports explicit instantiation""... $ac_c" 1>&6
- echo 'template<class T>class x{};template class x<int>;' > conftest.cc
- if test -z "`${CXX} -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
- fi
- rm -f conftest*
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ echo $ac_n "checking whether ${CXX} supports explicit instantiation""... $ac_c" 1>&6
+echo "configure:712: checking whether ${CXX} supports explicit instantiation" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 722 "configure"
+#include "confdefs.h"
+
+ template<class T>class x{};template class x<int>;
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
+
# if running on darwin no explicit template instantiations even though
# syntax is supported.
case $system in
@@ -729,27 +766,100 @@ CMAKE_ANSI_CXXFLAGS=""
if test $ac_cv_prog_gxx = no; then
case $system in
IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-LANG:std $CXXFLAGS"
echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -LANG:std -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-LANG:std"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+echo "configure:773: checking whether ${CXX} accepts -LANG:std" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 783 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CXXFLAGS="-LANG:std"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
;;
OSF1-*)
+
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-std strict_ansi -nopure_cname $CXXFLAGS"
echo $ac_n "checking whether ${CXX} accepts -std strict_ansi -nopure_cname""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -std strict_ansi -nopure_cname -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+echo "configure:821: checking whether ${CXX} accepts -std strict_ansi -nopure_cname" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 831 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
esac
fi
@@ -758,15 +868,51 @@ fi
# to get the templates compiled correctly
CMAKE_TEMPLATE_FLAGS=""
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.cc
- if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS -ptused -no_prelink"
+ echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
+echo "configure:875: checking whether ${CXX} accepts -ptused -no_prelink" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 885 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
@@ -774,68 +920,200 @@ fi
# check non-g++ compilers to see if they have the standard
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
-echo "configure:779: checking ansi standard C++ stream headers " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <iostream>
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_ANSI_STREAM_HEADERS="1"
- echo "$ac_t""no" 1>&6
- fi
+echo "configure:927: checking ansi standard C++ stream headers " >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 937 "configure"
+#include "confdefs.h"
+
+ #include <iostream>
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_ANSI_STREAM_HEADERS=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check compilers to see if they have std::stringstream
-echo $ac_n "checking for ansi standard C++ stringstream ""... $ac_c" 1>&6
-echo "configure:795: checking for ansi standard C++ stringstream " >&5
-rm -rf conftest.*
-cat > conftest.cc <<!
+CXXFLAGS_ORIG="$CXXFLAGS"
+CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+echo $ac_n "checking for ansi standard C++ stringstream""... $ac_c" 1>&6
+echo "configure:976: checking for ansi standard C++ stringstream" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 986 "configure"
+#include "confdefs.h"
+
#include <sstream>
-!
-if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+echo "$ac_t""yes" 1>&6
+
else
- CMAKE_NO_ANSI_STRING_STREAM="1"
- echo "$ac_t""no" 1>&6
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+CMAKE_NO_ANSI_STRING_STREAM=1
+echo "$ac_t""no" 1>&6
+
fi
+rm -f conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+CXXFLAGS="$CXXFLAGS_ORIG"
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
-echo "configure:811: checking ansi standard namespace support " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <list>
-void foo() { std::list<int> l; }
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_STD_NAMESPACE="1"
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ echo $ac_n "checking whether the std namespace is supported""... $ac_c" 1>&6
+echo "configure:1025: checking whether the std namespace is supported" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1035 "configure"
+#include "confdefs.h"
+
+ #include <list>
+ void foo() { std::list<int>(); }
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_STD_NAMESPACE=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking ansi for scope support ""... $ac_c" 1>&6
-echo "configure:829: checking ansi for scope support " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-void foo() { for(int i;;); for(int i;;); }
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_ANSI_FOR_SCOPE="1"
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ echo $ac_n "checking ansi for scope support""... $ac_c" 1>&6
+echo "configure:1076: checking ansi for scope support" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1086 "configure"
+#include "confdefs.h"
+
+ void foo() { for(int i;;); for(int i;;); }
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_ANSI_FOR_SCOPE=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
@@ -846,7 +1124,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:850: checking for $ac_word" >&5
+echo "configure:1128: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR_TMP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/Templates/cxxconfigure.in b/Templates/cxxconfigure.in
index 3e1f5b10..168ca7b 100644
--- a/Templates/cxxconfigure.in
+++ b/Templates/cxxconfigure.in
@@ -41,16 +41,23 @@ CXXFLAGS=$save_CXXFLAGS
CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION=""
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking whether ${CXX} supports explicit instantiation""... $ac_c" 1>&6
- echo 'template<class T>class x{};template class x<int>;' > conftest.cc
- if test -z "`${CXX} -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
- fi
- rm -f conftest*
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ AC_MSG_CHECKING([whether ${CXX} supports explicit instantiation])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ template<class T>class x{};template class x<int>;
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
+
# if running on darwin no explicit template instantiations even though
# syntax is supported.
case $system in
@@ -65,27 +72,40 @@ CMAKE_ANSI_CXXFLAGS=""
if test $ac_cv_prog_gxx = no; then
case $system in
IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
- echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -LANG:std -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-LANG:std"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-LANG:std $CXXFLAGS"
+ AC_MSG_CHECKING([whether ${CXX} accepts -LANG:std])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CXXFLAGS="-LANG:std"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
;;
OSF1-*)
- echo $ac_n "checking whether ${CXX} accepts -std strict_ansi -nopure_cname""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -std strict_ansi -nopure_cname -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-std strict_ansi -nopure_cname $CXXFLAGS"
+ AC_MSG_CHECKING([whether ${CXX} accepts -std strict_ansi -nopure_cname])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
esac
fi
AC_SUBST(CMAKE_ANSI_CXXFLAGS)
@@ -94,15 +114,21 @@ AC_SUBST(CMAKE_ANSI_CXXFLAGS)
# to get the templates compiled correctly
CMAKE_TEMPLATE_FLAGS=""
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.cc
- if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS -ptused -no_prelink"
+ AC_MSG_CHECKING([whether ${CXX} accepts -ptused -no_prelink])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
AC_SUBST(CMAKE_TEMPLATE_FLAGS)
@@ -110,64 +136,80 @@ AC_SUBST(CMAKE_TEMPLATE_FLAGS)
# check non-g++ compilers to see if they have the standard
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING( ansi standard C++ stream headers )
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <iostream>
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_ANSI_STREAM_HEADERS="1"
- echo "$ac_t""no" 1>&6
- fi
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <iostream>
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_ANSI_STREAM_HEADERS=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
AC_SUBST(CMAKE_NO_ANSI_STREAM_HEADERS)
# check compilers to see if they have std::stringstream
-AC_MSG_CHECKING( for ansi standard C++ stringstream )
-rm -rf conftest.*
-cat > conftest.cc <<!
+CXXFLAGS_ORIG="$CXXFLAGS"
+CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+AC_MSG_CHECKING([for ansi standard C++ stringstream])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
#include <sstream>
-!
-if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
-else
- CMAKE_NO_ANSI_STRING_STREAM="1"
- echo "$ac_t""no" 1>&6
-fi
+],,[
+AC_MSG_RESULT(yes)
+],[
+CMAKE_NO_ANSI_STRING_STREAM=1
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+CXXFLAGS="$CXXFLAGS_ORIG"
AC_SUBST(CMAKE_NO_ANSI_STRING_STREAM)
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
- AC_MSG_CHECKING( ansi standard namespace support )
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <list>
-void foo() { std::list<int> l; }
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_STD_NAMESPACE="1"
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ AC_MSG_CHECKING([whether the std namespace is supported])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <list>
+ void foo() { std::list<int>(); }
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_STD_NAMESPACE=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
AC_SUBST(CMAKE_NO_STD_NAMESPACE)
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
- AC_MSG_CHECKING( ansi for scope support )
- rm -rf conftest.*
- cat > conftest.cc <<!
-void foo() { for(int i;;); for(int i;;); }
-!
- if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- CMAKE_NO_ANSI_FOR_SCOPE="1"
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ AC_MSG_CHECKING([ansi for scope support])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() { for(int i;;); for(int i;;); }
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_ANSI_FOR_SCOPE=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
AC_SUBST(CMAKE_NO_ANSI_FOR_SCOPE)
diff --git a/configure b/configure
index bd4c27d..5b1c6b3 100755
--- a/configure
+++ b/configure
@@ -952,39 +952,132 @@ CMAKE_ANSI_CXXFLAGS=""
if test $ac_cv_prog_gxx = no; then
case $system in
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Aa $CFLAGS"
echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="-Aa"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+echo "configure:959: checking whether ${CC} accepts -Aa" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 961 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ CFLAGS="$CFLAGS_ORIG"
;;
- IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
+ IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-LANG:std $CXXFLAGS"
echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -LANG:std -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-LANG:std"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+echo "configure:991: checking whether ${CXX} accepts -LANG:std" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1001 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CXXFLAGS="-LANG:std"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
OSF1-*)
+
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-std strict_ansi -nopure_cname $CXXFLAGS"
echo $ac_n "checking whether ${CXX} accepts -std strict_ansi -nopure_cname""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -std strict_ansi -nopure_cname -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+echo "configure:1039: checking whether ${CXX} accepts -std strict_ansi -nopure_cname" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+ cat > conftest.$ac_ext <<EOF
+#line 1049 "configure"
+#include "confdefs.h"
+
+ void foo() {}
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+ CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
esac
fi
@@ -993,77 +1086,197 @@ fi
# check non-g++ compilers to see if they have the standard
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
-echo "configure:998: checking ansi standard C++ stream headers " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <iostream>
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- cat >> confdefs.h <<\EOF
-#define CMAKE_NO_ANSI_STREAM_HEADERS 1
+echo "configure:1093: checking ansi standard C++ stream headers " >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1103 "configure"
+#include "confdefs.h"
+
+ #include <iostream>
+
+int main() {
+
+; return 0; }
EOF
+if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_ANSI_STREAM_HEADERS=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check non-g++ compilers to see if they have std::stringstream
-echo $ac_n "checking for ansi standard C++ stringstream ""... $ac_c" 1>&6
-echo "configure:1016: checking for ansi standard C++ stringstream " >&5
-rm -rf conftest.*
-cat > conftest.cc <<!
+CXXFLAGS_ORIG="$CXXFLAGS"
+CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+echo $ac_n "checking for ansi standard C++ stringstream""... $ac_c" 1>&6
+echo "configure:1141: checking for ansi standard C++ stringstream" >&5
+
+ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 1151 "configure"
+#include "confdefs.h"
+
#include <sstream>
-!
-if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
-else
- cat >> confdefs.h <<\EOF
-#define CMAKE_NO_ANSI_STRING_STREAM 1
+
+int main() {
+
+; return 0; }
EOF
+if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+CMAKE_NO_ANSI_STRING_STREAM=1
+echo "$ac_t""no" 1>&6
- echo "$ac_t""no" 1>&6
fi
+rm -f conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+CXXFLAGS="$CXXFLAGS_ORIG"
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
-echo "configure:1034: checking ansi standard namespace support " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <list>
-void foo() { std::list<int> l; }
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- cat >> confdefs.h <<\EOF
-#define CMAKE_NO_STD_NAMESPACE 1
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ echo $ac_n "checking whether the std namespace is supported""... $ac_c" 1>&6
+echo "configure:1189: checking whether the std namespace is supported" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1199 "configure"
+#include "confdefs.h"
+
+ #include <list>
+ void foo() { std::list<int>(); }
+
+int main() {
+
+; return 0; }
EOF
+if { (eval echo configure:1209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_STD_NAMESPACE=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
- echo $ac_n "checking ansi for scope support ""... $ac_c" 1>&6
-echo "configure:1054: checking ansi for scope support " >&5
- rm -rf conftest.*
- cat > conftest.cc <<!
-void foo() { for(int i;;); for(int i;;); }
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- cat >> confdefs.h <<\EOF
-#define CMAKE_NO_ANSI_FOR_SCOPE 1
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ echo $ac_n "checking ansi for scope support""... $ac_c" 1>&6
+echo "configure:1239: checking ansi for scope support" >&5
+
+ ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+ cat > conftest.$ac_ext <<EOF
+#line 1249 "configure"
+#include "confdefs.h"
+
+ void foo() { for(int i;;); for(int i;;); }
+
+int main() {
+
+; return 0; }
EOF
+if { (eval echo configure:1258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+
+ echo "$ac_t""yes" 1>&6
+
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+
+ CMAKE_NO_ANSI_FOR_SCOPE=1
+ echo "$ac_t""no" 1>&6
+
+fi
+rm -f conftest*
+ ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# find make to use to build cmake, prefer gmake
@@ -1072,7 +1285,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1076: checking for $ac_word" >&5
+echo "configure:1289: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RUNMAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
diff --git a/configure.in b/configure.in
index 6961574..30e5cd2 100644
--- a/configure.in
+++ b/configure.in
@@ -67,39 +67,54 @@ CMAKE_ANSI_CXXFLAGS=""
if test $ac_cv_prog_gxx = no; then
case $system in
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
- echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CFLAGS="-Aa"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
+ CFLAGS_ORIG="$FLAGS"
+ CFLAGS="-Aa $CFLAGS"
+ AC_MSG_CHECKING([whether ${CC} accepts -Aa])
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ CFLAGS="$CFLAGS_ORIG"
;;
- IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
- echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -LANG:std -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-LANG:std"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+ IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-LANG:std $CXXFLAGS"
+ AC_MSG_CHECKING([whether ${CXX} accepts -LANG:std])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CXXFLAGS="-LANG:std"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
OSF1-*)
- echo $ac_n "checking whether ${CXX} accepts -std strict_ansi -nopure_cname""... $ac_c" 1>&6
- echo 'void f(){}' > conftest.c
- if test -z "`${CXX} -std strict_ansi -nopure_cname -c conftest.c 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
- else
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="-std strict_ansi -nopure_cname $CXXFLAGS"
+ AC_MSG_CHECKING([whether ${CXX} accepts -std strict_ansi -nopure_cname])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() {}
+ ],,[
+ AC_MSG_RESULT(yes)
+ CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
+ ;;
esac
fi
AC_SUBST(CMAKE_ANSI_CFLAGS)
@@ -108,61 +123,77 @@ AC_SUBST(CMAKE_ANSI_CXXFLAGS)
# check non-g++ compilers to see if they have the standard
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING( ansi standard C++ stream headers )
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <iostream>
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
- echo "$ac_t""no" 1>&6
- fi
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <iostream>
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_ANSI_STREAM_HEADERS=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check non-g++ compilers to see if they have std::stringstream
-AC_MSG_CHECKING( for ansi standard C++ stringstream )
-rm -rf conftest.*
-cat > conftest.cc <<!
+CXXFLAGS_ORIG="$CXXFLAGS"
+CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+AC_MSG_CHECKING([for ansi standard C++ stringstream])
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE([
#include <sstream>
-!
-if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
-else
- AC_DEFINE(CMAKE_NO_ANSI_STRING_STREAM)
- echo "$ac_t""no" 1>&6
-fi
+],,[
+AC_MSG_RESULT(yes)
+],[
+CMAKE_NO_ANSI_STRING_STREAM=1
+AC_MSG_RESULT(no)
+])
+AC_LANG_RESTORE
+CXXFLAGS="$CXXFLAGS_ORIG"
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
- AC_MSG_CHECKING( ansi standard namespace support )
- rm -rf conftest.*
- cat > conftest.cc <<!
-#include <list>
-void foo() { std::list<int> l; }
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ AC_MSG_CHECKING([whether the std namespace is supported])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <list>
+ void foo() { std::list<int>(); }
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_STD_NAMESPACE=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
- AC_MSG_CHECKING( ansi for scope support )
- rm -rf conftest.*
- cat > conftest.cc <<!
-void foo() { for(int i;;); for(int i;;); }
-!
- if test -z "`${CXX} $CMAKE_ANSI_CXXFLAGS $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
- echo "$ac_t""yes" 1>&6
- else
- AC_DEFINE(CMAKE_NO_ANSI_FOR_SCOPE)
- echo "$ac_t""no" 1>&6
- fi
+ CXXFLAGS_ORIG="$CXXFLAGS"
+ CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
+ AC_MSG_CHECKING([ansi for scope support])
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ void foo() { for(int i;;); for(int i;;); }
+ ],,[
+ AC_MSG_RESULT(yes)
+ ],[
+ CMAKE_NO_ANSI_FOR_SCOPE=1
+ AC_MSG_RESULT(no)
+ ])
+ AC_LANG_RESTORE
+ CXXFLAGS="$CXXFLAGS_ORIG"
fi
# find make to use to build cmake, prefer gmake