Added support for Darwin (OSX)

This commit is contained in:
Yves Starreveld 2001-08-28 13:49:43 -04:00
parent 8db8e7bb22
commit 1df66821a3
2 changed files with 52 additions and 26 deletions

65
Templates/configure vendored
View File

@ -2281,6 +2281,19 @@ fi
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_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
CMAKE_SHLIB_CFLAGS="+z"
CMAKE_SHLIB_LD_LIBS=""
@ -2328,17 +2341,17 @@ fi
else
ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
echo "configure:2332: checking for dld.h" >&5
echo "configure:2345: 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 2337 "configure"
#line 2350 "configure"
#include "confdefs.h"
#include <dld.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2355: \"$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*
@ -2597,17 +2610,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:2601: checking for $ac_hdr" >&5
echo "configure:2614: 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 2606 "configure"
#line 2619 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2624: \"$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*
@ -2652,17 +2665,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:2656: checking for $ac_hdr" >&5
echo "configure:2669: 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 2661 "configure"
#line 2674 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2679: \"$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*
@ -2691,7 +2704,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:2695: checking for pthread_create in -lpthreads" >&5
echo "configure:2708: 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
@ -2699,7 +2712,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthreads $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2703 "configure"
#line 2716 "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
@ -2710,7 +2723,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2727: \"$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
@ -2731,7 +2744,7 @@ else
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:2735: checking for pthread_create in -lpthread" >&5
echo "configure:2748: 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
@ -2739,7 +2752,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2743 "configure"
#line 2756 "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
@ -2750,7 +2763,7 @@ int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2767: \"$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
@ -2773,7 +2786,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:2777: checking for thr_create in -lthread" >&5
echo "configure:2790: 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
@ -2781,7 +2794,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2785 "configure"
#line 2798 "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
@ -2792,7 +2805,7 @@ int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2809: \"$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
@ -2815,7 +2828,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:2819: checking for thr_create in -lthread" >&5
echo "configure:2832: 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
@ -2823,7 +2836,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2827 "configure"
#line 2840 "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
@ -2834,7 +2847,7 @@ int main() {
thr_create()
; return 0; }
EOF
if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2851: \"$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
@ -2944,7 +2957,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:2948: checking ansi standard C++ stream headers " >&5
echo "configure:2961: checking ansi standard C++ stream headers " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
@ -2961,7 +2974,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:2965: checking ansi standard namespace support " >&5
echo "configure:2978: checking ansi standard namespace support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <list>
@ -2979,7 +2992,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:2983: checking ansi for scope support " >&5
echo "configure:2996: checking ansi for scope support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
void foo() { for(int i;;); for(int i;;); }
@ -3004,7 +3017,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:3008: checking for $ac_word" >&5
echo "configure:3021: 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
@ -3044,7 +3057,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:3048: checking for $ac_word" >&5
echo "configure:3061: 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

View File

@ -127,6 +127,19 @@ case $system in
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_RUNTIME_FLAG=""
CMAKE_SHLIB_RUNTIME_SEP=":"
;;
HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
CMAKE_SHLIB_CFLAGS="+z"
CMAKE_SHLIB_LD_LIBS=""