diff --git a/Templates/configure b/Templates/configure index 83e6f2f8b..0796c0509 100755 --- a/Templates/configure +++ b/Templates/configure @@ -2929,7 +2929,20 @@ case $system in ;; esac -# if running on darwin no explicit template instantiations +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 'templateclass x{};template class x;' > 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* +fi +# if running on darwin no explicit template instantiations even though +# syntax is supported. case $system in Darwin*) CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1" @@ -2993,17 +3006,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:2997: checking for $ac_hdr" >&5 +echo "configure:3010: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3020: \"$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* @@ -3048,17 +3061,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:3052: checking for $ac_hdr" >&5 +echo "configure:3065: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3075: \"$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* @@ -3087,7 +3100,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:3091: checking for pthread_create in -lpthreads" >&5 +echo "configure:3104: 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 @@ -3095,7 +3108,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthreads $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3123: \"$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 @@ -3127,7 +3140,7 @@ else fi echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6 -echo "configure:3131: checking for pthread_create in -lpthread" >&5 +echo "configure:3144: 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 @@ -3135,7 +3148,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3163: \"$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 @@ -3169,7 +3182,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:3173: checking for thr_create in -lthread" >&5 +echo "configure:3186: 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 @@ -3177,7 +3190,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3205: \"$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 @@ -3211,7 +3224,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:3215: checking for thr_create in -lthread" >&5 +echo "configure:3228: 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 @@ -3219,7 +3232,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3247: \"$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 @@ -3340,7 +3353,7 @@ fi # ansi stream files (without the .h) if test $ac_cv_prog_gxx = no; then echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6 -echo "configure:3344: checking ansi standard C++ stream headers " >&5 +echo "configure:3357: checking ansi standard C++ stream headers " >&5 rm -rf conftest.* cat > conftest.cc < @@ -3357,7 +3370,7 @@ fi # 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:3361: checking ansi standard namespace support " >&5 +echo "configure:3374: checking ansi standard namespace support " >&5 rm -rf conftest.* cat > conftest.cc < @@ -3375,7 +3388,7 @@ 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:3379: checking ansi for scope support " >&5 +echo "configure:3392: checking ansi for scope support " >&5 rm -rf conftest.* cat > conftest.cc <&6 -echo "configure:3404: checking for $ac_word" >&5 +echo "configure:3417: 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 @@ -3440,7 +3453,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:3444: checking for $ac_word" >&5 +echo "configure:3457: 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/configure.in b/Templates/configure.in index 3a6254502..a1eb7a50c 100644 --- a/Templates/configure.in +++ b/Templates/configure.in @@ -477,7 +477,20 @@ case $system in ;; esac -# if running on darwin no explicit template instantiations +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 'templateclass x{};template class x;' > 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* +fi +# if running on darwin no explicit template instantiations even though +# syntax is supported. case $system in Darwin*) CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"