summaryrefslogtreecommitdiffstats
path: root/Templates
diff options
context:
space:
mode:
authorYves Starreveld <ystarrev@uwo.ca>2001-08-28 22:01:37 (GMT)
committerYves Starreveld <ystarrev@uwo.ca>2001-08-28 22:01:37 (GMT)
commit0b58132cd4ece384c8436da0a909bbe5d728038e (patch)
tree385ece497c176bd5232de4062317737e8ce580d6 /Templates
parent74ef4e4e583537b3d7a5a9e87bcb6e45238558d2 (diff)
downloadCMake-0b58132cd4ece384c8436da0a909bbe5d728038e.zip
CMake-0b58132cd4ece384c8436da0a909bbe5d728038e.tar.gz
CMake-0b58132cd4ece384c8436da0a909bbe5d728038e.tar.bz2
Changes to allow a MODULE target for a shared library.
Diffstat (limited to 'Templates')
-rw-r--r--Templates/CMakeSystemConfig.cmake.in6
-rwxr-xr-xTemplates/configure142
-rw-r--r--Templates/configure.in81
3 files changed, 180 insertions, 49 deletions
diff --git a/Templates/CMakeSystemConfig.cmake.in b/Templates/CMakeSystemConfig.cmake.in
index b2d51d5..bdc5736 100644
--- a/Templates/CMakeSystemConfig.cmake.in
+++ b/Templates/CMakeSystemConfig.cmake.in
@@ -32,14 +32,20 @@ SET (CMAKE_SHLIB_CFLAGS "@CMAKE_SHLIB_CFLAGS@" CACHE STRING
"Flag used for building shared library objects" )
SET (CMAKE_SHLIB_BUILD_FLAGS "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE STRING
"Flag used by CXX to build a shared library")
+SET (CMAKE_MODULE_BUILD_FLAGS "@CMAKE_MODULE_BUILD_FLAGS@" CACHE STRING
+ "Flag used by CXX to build a shared library")
SET (CMAKE_SHLIB_SUFFIX @CMAKE_SHLIB_SUFFIX@ CACHE STRING
"Shared library suffix")
+SET (CMAKE_MODULE_SUFFIX @CMAKE_MODULE_SUFFIX@ CACHE STRING
+ "Module library suffix")
SET (CMAKE_THREAD_LIBS "@CMAKE_THREAD_LIBS@" CACHE STRING
"Thread library used")
SET (CMAKE_DL_LIBS "@CMAKE_DL_LIBS@" CACHE STRING
"Dynamic link library to link in.")
SET (CMAKE_SHLIB_LINK_FLAGS "@CMAKE_SHLIB_LINK_FLAGS@" CACHE STRING
"Flags used to link a shared library.")
+SET (CMAKE_MODULE_LINK_FLAGS "@CMAKE_MODULE_LINK_FLAGS@" CACHE STRING
+ "Flags used to link a shared library.")
SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE STRING
"Libraries used by LD for shared libraries")
SET (CMAKE_SHLIB_RUNTIME_FLAG "@CMAKE_SHLIB_RUNTIME_FLAG@" CACHE STRING
diff --git a/Templates/configure b/Templates/configure
index 60d2f07..7bea923 100755
--- a/Templates/configure
+++ b/Templates/configure
@@ -2236,9 +2236,10 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS='${LIBS}'
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
echo $ac_n "checking for printf in -lld""... $ac_c" 1>&6
-echo "configure:2242: checking for printf in -lld" >&5
+echo "configure:2243: 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
@@ -2246,7 +2247,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2250 "configure"
+#line 2251 "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
@@ -2257,7 +2258,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2262: \"$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
@@ -2278,34 +2279,40 @@ else
fi
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
Darwin-*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".dylib"
- CMAKE_MODULE_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib -undefined warning" #undefined warning must go away post 10.1
- CMAKE_SHLIB_LINK_FLAGS=""
- CMAKE_MODULE_BUILD_FLAGS="-bundle -undefined warning" #undefined warning must go away post 10.1
- CMAKE_MODULE_LINK_FLAGS=""
+ CMAKE_SHLIB_CFLAGS=""
+ CMAKE_SHLIB_LD_LIBS=""
+ CMAKE_SHLIB_SUFFIX=".dylib"
+ CMAKE_MODULE_SUFFIX=".so"
+ CMAKE_DL_LIBS=""
+ CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib -undefined warning" #undefined warning must go away once dylibs link in
+ CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_BUILD_FLAGS="-bundle -undefined warning" #undefined warning must go away once dylibs link in
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=":"
- ;;
+ ;;
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
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'
CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
+ CMAKE_MODULE_BUILD_FLAGS='+Z -Wl,-E -b'
+ CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
CMAKE_SHLIB_RUNTIME_SEP=':'
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
+ CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
CMAKE_SHLIB_RUNTIME_SEP=':'
fi
@@ -2314,8 +2321,10 @@ fi
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -2323,8 +2332,10 @@ fi
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -2332,26 +2343,29 @@ fi
CMAKE_SHLIB_CFLAGS="-fPIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_SHLIB_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
if test "$have_dl" = yes; then
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
+ CMAKE_MODULE_LINK_FLAGS="-rdynamic"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2345: checking for dld.h" >&5
+echo "configure:2359: 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 2350 "configure"
+#line 2364 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2369: \"$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*
@@ -2370,6 +2384,7 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
CMAKE_DL_LIBS="-ldld"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=""
else
@@ -2382,8 +2397,11 @@ fi
CMAKE_SHLIB_CFLAGS=""
CMAKE_DL_LIBS="-lgdi32"
CMAKE_SHLIB_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
CMAKE_SHLIB_SUFFIX=".dll"
+ CMAKE_MODULE_SUFFIX=".dll"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2391,8 +2409,10 @@ fi
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2400,8 +2420,10 @@ fi
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2411,17 +2433,22 @@ fi
CMAKE_SHLIB_CFLAGS="-fPIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
else
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
fi
@@ -2430,8 +2457,10 @@ fi
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2441,8 +2470,10 @@ fi
# Hack: make package name same as library name
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2451,8 +2482,10 @@ fi
CMAKE_SHLIB_CFLAGS="-fpic"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2461,9 +2494,12 @@ fi
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -2471,8 +2507,10 @@ fi
CMAKE_SHLIB_CFLAGS="-G 0"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2483,8 +2521,10 @@ fi
CMAKE_SHLIB_CFLAGS="-Kpic -belf"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
+ CMAKE_SHLIB_MODULE_FLAGS="-belf -Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2492,8 +2532,10 @@ fi
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2501,9 +2543,12 @@ fi
CMAKE_SHLIB_CFLAGS="-PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -2511,14 +2556,19 @@ fi
CMAKE_SHLIB_CFLAGS="-KPIC"
CMAKE_SHLIB_LD_LIBS='${LIBS}'
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_BUILD_FLAGS='-G'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-G'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-R "
CMAKE_SHLIB_RUNTIME_SEP=":"
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-Wl,-G'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
CMAKE_SHLIB_RUNTIME_SEP=":"
fi
@@ -2526,9 +2576,11 @@ fi
ULTRIX-4.*)
CMAKE_SHLIB_CFLAGS="-G 0"
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -2536,13 +2588,16 @@ fi
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
esac
export CMAKE_SHLIB_SUFFIX
+export CMAKE_MODULE_SUFFIX
# If we're running gcc, then change the C flags for compiling shared
# libraries to the right flags for gcc, instead of those for the
@@ -2555,6 +2610,9 @@ case $system in
CYGWIN_NT*)
CMAKE_SHLIB_CFLAGS=""
;;
+ Darwin*) #don't need -fPIC on Darwin (on by default)
+ CMAKE_SHLIB_CFLAGS=""
+ ;;
esac
# If the user has supplied C flags for compiling shared objects, use
@@ -2576,6 +2634,9 @@ CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
+
+
+
##########################
## ##
## Check thread support ##
@@ -2610,17 +2671,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:2614: checking for $ac_hdr" >&5
+echo "configure:2675: 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 2619 "configure"
+#line 2680 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2685: \"$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*
@@ -2665,17 +2726,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:2669: checking for $ac_hdr" >&5
+echo "configure:2730: 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 2674 "configure"
+#line 2735 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2740: \"$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*
@@ -2704,7 +2765,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:2708: checking for pthread_create in -lpthreads" >&5
+echo "configure:2769: 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
@@ -2712,7 +2773,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2716 "configure"
+#line 2777 "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
@@ -2723,7 +2784,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2788: \"$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
@@ -2744,7 +2805,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2748: checking for pthread_create in -lpthread" >&5
+echo "configure:2809: 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
@@ -2752,7 +2813,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2756 "configure"
+#line 2817 "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
@@ -2763,7 +2824,7 @@ int main() {
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:2767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2828: \"$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
@@ -2786,7 +2847,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:2790: checking for thr_create in -lthread" >&5
+echo "configure:2851: 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
@@ -2794,7 +2855,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2798 "configure"
+#line 2859 "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
@@ -2805,7 +2866,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2870: \"$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
@@ -2828,7 +2889,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:2832: checking for thr_create in -lthread" >&5
+echo "configure:2893: 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
@@ -2836,7 +2897,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2840 "configure"
+#line 2901 "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
@@ -2847,7 +2908,7 @@ int main() {
thr_create()
; return 0; }
EOF
-if { (eval echo configure:2851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2912: \"$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
@@ -2957,7 +3018,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:2961: checking ansi standard C++ stream headers " >&5
+echo "configure:3022: checking ansi standard C++ stream headers " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
@@ -2974,7 +3035,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:2978: checking ansi standard namespace support " >&5
+echo "configure:3039: checking ansi standard namespace support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <list>
@@ -2992,7 +3053,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:2996: checking ansi for scope support " >&5
+echo "configure:3057: checking ansi for scope support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
void foo() { for(int i;;); for(int i;;); }
@@ -3017,7 +3078,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:3021: checking for $ac_word" >&5
+echo "configure:3082: 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
@@ -3057,7 +3118,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:3061: checking for $ac_word" >&5
+echo "configure:3122: 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
@@ -3280,11 +3341,14 @@ s%@CMAKE_HAVE_UNISTD_H@%$CMAKE_HAVE_UNISTD_H%g
s%@fullSrcDir@%$fullSrcDir%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
+s%@CMAKE_MODULE_BUILD_FLAGS@%$CMAKE_MODULE_BUILD_FLAGS%g
s%@CMAKE_SHLIB_CFLAGS@%$CMAKE_SHLIB_CFLAGS%g
s%@CMAKE_LIB_EXT@%$CMAKE_LIB_EXT%g
s%@CMAKE_DL_LIBS@%$CMAKE_DL_LIBS%g
s%@CMAKE_SHLIB_LD_LIBS@%$CMAKE_SHLIB_LD_LIBS%g
s%@CMAKE_SHLIB_SUFFIX@%$CMAKE_SHLIB_SUFFIX%g
+s%@CMAKE_MODULE_SUFFIX@%$CMAKE_MODULE_SUFFIX%g
s%@CMAKE_SHLIB_RUNTIME_FLAG@%$CMAKE_SHLIB_RUNTIME_FLAG%g
s%@CMAKE_SHLIB_RUNTIME_SEP@%$CMAKE_SHLIB_RUNTIME_SEP%g
s%@CMAKE_USE_SPROC@%$CMAKE_USE_SPROC%g
diff --git a/Templates/configure.in b/Templates/configure.in
index fa046fb..fd90d8d 100644
--- a/Templates/configure.in
+++ b/Templates/configure.in
@@ -121,37 +121,44 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS='${LIBS}'
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
AC_CHECK_LIB(ld,printf, CMAKE_DL_LIBS="-lld")
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
Darwin-*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".dylib"
- CMAKE_MODULE_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib -undefined warning" #undefined warning must go away post 10.1
- CMAKE_SHLIB_LINK_FLAGS=""
- CMAKE_MODULE_BUILD_FLAGS="-bundle -undefined warning" #undefined warning must go away post 10.1
- CMAKE_MODULE_LINK_FLAGS=""
+ CMAKE_SHLIB_CFLAGS=""
+ CMAKE_SHLIB_LD_LIBS=""
+ CMAKE_SHLIB_SUFFIX=".dylib"
+ CMAKE_MODULE_SUFFIX=".so"
+ CMAKE_DL_LIBS=""
+ CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib -undefined warning" #undefined warning must go away once dylibs link in
+ CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_BUILD_FLAGS="-bundle -undefined warning" #undefined warning must go away once dylibs link in
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=":"
- ;;
+ ;;
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
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'
CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
+ CMAKE_MODULE_BUILD_FLAGS='+Z -Wl,-E -b'
+ CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
CMAKE_SHLIB_RUNTIME_SEP=':'
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
+ CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
CMAKE_SHLIB_RUNTIME_SEP=':'
fi
@@ -160,8 +167,10 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -169,8 +178,10 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -178,16 +189,20 @@ case $system in
CMAKE_SHLIB_CFLAGS="-fPIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_SHLIB_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
if test "$have_dl" = yes; then
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
+ CMAKE_MODULE_LINK_FLAGS="-rdynamic"
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
else
AC_CHECK_HEADER(dld.h, [
CMAKE_DL_LIBS="-ldld"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=""])
fi
@@ -196,8 +211,11 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_DL_LIBS="-lgdi32"
CMAKE_SHLIB_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
CMAKE_SHLIB_SUFFIX=".dll"
+ CMAKE_MODULE_SUFFIX=".dll"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -205,8 +223,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -214,8 +234,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -225,17 +247,22 @@ case $system in
CMAKE_SHLIB_CFLAGS="-fPIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS="-shared"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_BUILD_FLAGS="-shared"
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
else
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
fi
@@ -244,8 +271,10 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -255,8 +284,10 @@ case $system in
# Hack: make package name same as library name
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -265,8 +296,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-fpic"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -275,9 +308,12 @@ case $system in
CMAKE_SHLIB_CFLAGS=""
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -285,8 +321,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-G 0"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -297,8 +335,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-Kpic -belf"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
+ CMAKE_SHLIB_MODULE_FLAGS="-belf -Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -306,8 +346,10 @@ case $system in
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS=""
+ CMAKE_MODULE_LINK_FLAGS=""
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -315,9 +357,12 @@ case $system in
CMAKE_SHLIB_CFLAGS="-PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
@@ -325,14 +370,19 @@ case $system in
CMAKE_SHLIB_CFLAGS="-KPIC"
CMAKE_SHLIB_LD_LIBS='${LIBS}'
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_BUILD_FLAGS='-G'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-G'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-R "
CMAKE_SHLIB_RUNTIME_SEP=":"
if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
CMAKE_SHLIB_LINK_FLAGS=''
+ CMAKE_MODULE_BUILD_FLAGS='-Wl,-G'
+ CMAKE_MODULE_LINK_FLAGS=''
CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
CMAKE_SHLIB_RUNTIME_SEP=":"
fi
@@ -340,9 +390,11 @@ case $system in
ULTRIX-4.*)
CMAKE_SHLIB_CFLAGS="-G 0"
CMAKE_SHLIB_SUFFIX="..o"
+ CMAKE_MODULE_SUFFIX="..o"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_DL_LIBS=""
CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
@@ -350,13 +402,16 @@ case $system in
CMAKE_SHLIB_CFLAGS="-K PIC"
CMAKE_SHLIB_LD_LIBS=""
CMAKE_SHLIB_SUFFIX=".so"
+ CMAKE_MODULE_SUFFIX=".so"
CMAKE_DL_LIBS="-ldl"
CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
+ CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
CMAKE_SHLIB_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=""
;;
esac
export CMAKE_SHLIB_SUFFIX
+export CMAKE_MODULE_SUFFIX
# If we're running gcc, then change the C flags for compiling shared
# libraries to the right flags for gcc, instead of those for the
@@ -369,6 +424,9 @@ case $system in
CYGWIN_NT*)
CMAKE_SHLIB_CFLAGS=""
;;
+ Darwin*) #don't need -fPIC on Darwin (on by default)
+ CMAKE_SHLIB_CFLAGS=""
+ ;;
esac
# If the user has supplied C flags for compiling shared objects, use
@@ -381,11 +439,14 @@ CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
AC_SUBST(CMAKE_SHLIB_LINK_FLAGS)
AC_SUBST(CMAKE_SHLIB_BUILD_FLAGS)
+AC_SUBST(CMAKE_MODULE_LINK_FLAGS)
+AC_SUBST(CMAKE_MODULE_BUILD_FLAGS)
AC_SUBST(CMAKE_SHLIB_CFLAGS)
AC_SUBST(CMAKE_LIB_EXT)
AC_SUBST(CMAKE_DL_LIBS)
AC_SUBST(CMAKE_SHLIB_LD_LIBS)
AC_SUBST(CMAKE_SHLIB_SUFFIX)
+AC_SUBST(CMAKE_MODULE_SUFFIX)
AC_SUBST(CMAKE_SHLIB_RUNTIME_FLAG)
AC_SUBST(CMAKE_SHLIB_RUNTIME_SEP)