summaryrefslogtreecommitdiffstats
path: root/Templates/cconfigure
diff options
context:
space:
mode:
Diffstat (limited to 'Templates/cconfigure')
-rwxr-xr-xTemplates/cconfigure64
1 files changed, 34 insertions, 30 deletions
diff --git a/Templates/cconfigure b/Templates/cconfigure
index 76cd1b7..10a057a 100755
--- a/Templates/cconfigure
+++ b/Templates/cconfigure
@@ -2381,6 +2381,7 @@ fi
# Step 4: set configuration options based on system name and version.
+CMAKE_C_LINK_SHARED=${CC}
fullSrcDir=`cd $srcdir; pwd`
case $system in
@@ -2393,7 +2394,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:2397: checking for printf in -lld" >&5
+echo "configure:2398: 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
@@ -2401,7 +2402,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2405 "configure"
+#line 2406 "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
@@ -2412,7 +2413,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:2416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2417: \"$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
@@ -2459,18 +2460,20 @@ fi
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
HP-UX-*)
+ CMAKE_C_LINK_SHARED=ld
CMAKE_SHLIB_CFLAGS="+Z"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".sl"
CMAKE_MODULE_SUFFIX=".sl"
CMAKE_DL_LIBS="-ldld"
- CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -b -L/usr/lib'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
- CMAKE_MODULE_BUILD_FLAGS='+Z -Wl,-E -b -L/usr/lib'
- CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
- CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
+ CMAKE_SHLIB_BUILD_FLAGS='+Z -E -b -L/usr/lib'
+ CMAKE_SHLIB_LINK_FLAGS='+s'
+ CMAKE_MODULE_BUILD_FLAGS='+Z -E -b -L/usr/lib'
+ CMAKE_MODULE_LINK_FLAGS='+s'
+ CMAKE_SHLIB_RUNTIME_FLAG='+b,'
CMAKE_SHLIB_RUNTIME_SEP=':'
if test $ac_cv_prog_gcc = yes; then
+ CMAKE_C_LINK_SHARED=${CC}
CMAKE_SHLIB_CFLAGS="-fPIC"
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
@@ -2518,17 +2521,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2522: checking for dld.h" >&5
+echo "configure:2525: 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 2527 "configure"
+#line 2530 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2535: \"$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*
@@ -2837,17 +2840,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:2841: checking for $ac_hdr" >&5
+echo "configure:2844: 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 2846 "configure"
+#line 2849 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2854: \"$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*
@@ -2892,17 +2895,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:2896: checking for $ac_hdr" >&5
+echo "configure:2899: 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 2901 "configure"
+#line 2904 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2909: \"$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*
@@ -2931,7 +2934,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:2935: checking for pthread_create in -lpthreads" >&5
+echo "configure:2938: 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
@@ -2939,7 +2942,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2943 "configure"
+#line 2946 "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
@@ -2950,7 +2953,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2957: \"$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
@@ -2971,7 +2974,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2975: checking for pthread_create in -lpthread" >&5
+echo "configure:2978: 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
@@ -2979,7 +2982,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2983 "configure"
+#line 2986 "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
@@ -2990,7 +2993,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2997: \"$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
@@ -3013,7 +3016,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:3017: checking for thr_create in -lthread" >&5
+echo "configure:3020: 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
@@ -3021,7 +3024,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3025 "configure"
+#line 3028 "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
@@ -3032,7 +3035,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3039: \"$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
@@ -3055,7 +3058,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:3059: checking for thr_create in -lthread" >&5
+echo "configure:3062: 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
@@ -3063,7 +3066,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3067 "configure"
+#line 3070 "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
@@ -3074,7 +3077,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:3078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3081: \"$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
@@ -3168,7 +3171,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:3172: checking for $ac_word" >&5
+echo "configure:3175: 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
@@ -3381,6 +3384,7 @@ s%@CMAKE_WORDS_BIGENDIAN@%$CMAKE_WORDS_BIGENDIAN%g
s%@CMAKE_HAVE_LIMITS_H@%$CMAKE_HAVE_LIMITS_H%g
s%@CMAKE_HAVE_UNISTD_H@%$CMAKE_HAVE_UNISTD_H%g
s%@fullSrcDir@%$fullSrcDir%g
+s%@CMAKE_C_LINK_SHARED@%$CMAKE_C_LINK_SHARED%g
s%@CMAKE_SHLIB_LINK_FLAGS@%$CMAKE_SHLIB_LINK_FLAGS%g
s%@CMAKE_SHLIB_BUILD_FLAGS@%$CMAKE_SHLIB_BUILD_FLAGS%g
s%@CMAKE_MODULE_LINK_FLAGS@%$CMAKE_MODULE_LINK_FLAGS%g