From 9998057d6a88295a1509f9884f691b533347a8a1 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 24 Aug 2001 17:25:19 -0400 Subject: [PATCH] auto detect lang:std: --- configure | 37 +++++++++++++++++++------------------ configure.in | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 224b23e44..0c1f7c3fe 100755 --- a/configure +++ b/configure @@ -1974,6 +1974,7 @@ case $system in ;; esac fi +CXXFLAGS=$CXXFLAGS $CMAKE_ANSI_CFLAGS # if we are not running g++ then we might need some other flags # to get the templates compiled correctly @@ -2001,7 +2002,7 @@ fi # check no g++ compilers to see if they have the standard # ansi stream files (without the .h) if test $ac_cv_cxx_compiler_gnu = no; then - echo "$as_me:2004: checking ansi standard C++ stream headers " >&5 + echo "$as_me:2005: checking ansi standard C++ stream headers " >&5 echo $ECHO_N "checking ansi standard C++ stream headers ... $ECHO_C" >&6 rm -rf conftest.* cat > conftest.cc <&5 + echo "$as_me:2024: checking ansi standard namespace support " >&5 echo $ECHO_N "checking ansi standard namespace support ... $ECHO_C" >&6 rm -rf conftest.* cat > conftest.cc <&5 + echo "$as_me:2044: checking ansi for scope support " >&5 echo $ECHO_N "checking ansi for scope support ... $ECHO_C" >&6 rm -rf conftest.* cat > conftest.cc <&5 +echo "$as_me:2066: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_RUNMAKE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2079,7 +2080,7 @@ for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if $as_executable_p "$ac_dir/$ac_word"; then ac_cv_path_RUNMAKE="$ac_dir/$ac_word" - echo "$as_me:2082: found $ac_dir/$ac_word" >&5 + echo "$as_me:2083: found $ac_dir/$ac_word" >&5 break fi done @@ -2090,10 +2091,10 @@ fi RUNMAKE=$ac_cv_path_RUNMAKE if test -n "$RUNMAKE"; then - echo "$as_me:2093: result: $RUNMAKE" >&5 + echo "$as_me:2094: result: $RUNMAKE" >&5 echo "${ECHO_T}$RUNMAKE" >&6 else - echo "$as_me:2096: result: no" >&5 + echo "$as_me:2097: result: no" >&5 echo "${ECHO_T}no" >&6 fi @@ -2180,7 +2181,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:2183: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:2184: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -2352,7 +2353,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:2355: error: ambiguous option: $1 + { { echo "$as_me:2356: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -2371,7 +2372,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:2374: error: unrecognized option: $1 + -*) { { echo "$as_me:2375: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -2409,7 +2410,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "Source/Makefile" ) CONFIG_FILES="$CONFIG_FILES Source/Makefile" ;; "Source/cmConfigure.h" ) CONFIG_HEADERS="$CONFIG_HEADERS Source/cmConfigure.h" ;; - *) { { echo "$as_me:2412: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:2413: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -2614,7 +2615,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:2617: creating $ac_file" >&5 + { echo "$as_me:2618: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -2632,7 +2633,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:2635: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:2636: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -2645,7 +2646,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:2648: error: cannot find input file: $f" >&5 + { { echo "$as_me:2649: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -2705,7 +2706,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:2708: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:2709: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -2716,7 +2717,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:2719: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:2720: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -2729,7 +2730,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:2732: error: cannot find input file: $f" >&5 + { { echo "$as_me:2733: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -2846,7 +2847,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:2849: $ac_file is unchanged" >&5 + { echo "$as_me:2850: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ diff --git a/configure.in b/configure.in index 6a4099a2b..2f0fa4e03 100644 --- a/configure.in +++ b/configure.in @@ -68,6 +68,7 @@ case $system in ;; esac fi +CXXFLAGS=$CXXFLAGS $CMAKE_ANSI_CFLAGS AC_SUBST(CMAKE_ANSI_CFLAGS) # if we are not running g++ then we might need some other flags