summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-05-21 18:01:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-05-21 18:01:30 (GMT)
commit4ea1c51ebae49375bbb4bafce8e40a02741bda3a (patch)
treeb6d3bd9965e6961da314beaf0e585f38bfc3b835
parentf0e21f196a3abe908d6179d3f5ac36d3ea583761 (diff)
downloadCMake-4ea1c51ebae49375bbb4bafce8e40a02741bda3a.zip
CMake-4ea1c51ebae49375bbb4bafce8e40a02741bda3a.tar.gz
CMake-4ea1c51ebae49375bbb4bafce8e40a02741bda3a.tar.bz2
clean up for build on its own
-rw-r--r--Source/Makefile.in2
-rw-r--r--Source/cmBuildNameCommand.cxx7
-rw-r--r--Source/cmUnixMakefileGenerator.cxx1
-rw-r--r--Templates/CMakeSystemConfig.cmake.in2
-rwxr-xr-xconfigure1996
-rw-r--r--configure.in396
6 files changed, 34 insertions, 2370 deletions
diff --git a/Source/Makefile.in b/Source/Makefile.in
index d0fadb8..9daeac0 100644
--- a/Source/Makefile.in
+++ b/Source/Makefile.in
@@ -3,7 +3,7 @@ VPATH = @srcdir@
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
CXX = @CXX@
-CXXFLAGS = -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/CMake/Source
+CXXFLAGS = -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/Source
.SUFFIXES: .cxx .java .class
diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx
index a8c727a..8ec6e47 100644
--- a/Source/cmBuildNameCommand.cxx
+++ b/Source/cmBuildNameCommand.cxx
@@ -68,10 +68,15 @@ bool cmBuildNameCommand::Invoke(std::vector<std::string>& args)
if(reg.find(buildname.c_str()))
{
buildname = reg.match(1) + "-" + reg.match(2);
+ cmSystemTools::ReplaceString(buildname,
+ "/", "_");
+ cmSystemTools::ReplaceString(buildname,
+ "(", "_");
+ cmSystemTools::ReplaceString(buildname,
+ ")", "_");
}
}
}
-
std::string compiler = "-${CMAKE_CXX_COMPILER}";
m_Makefile->ExpandVariablesInString ( compiler );
buildname += compiler;
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index d1490a4..cadd0cd 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -901,6 +901,7 @@ void cmUnixMakefileGenerator::ComputeSystemInfo()
cmd = root;
cmd += "/Templates/configure";
cmSystemTools::RunCommand(cmd.c_str(), output);
+ m_Makefile->AddDefinition("RUN_CONFIGURE", true);
}
// now load the settings
diff --git a/Templates/CMakeSystemConfig.cmake.in b/Templates/CMakeSystemConfig.cmake.in
index a502ea9..8c1c424 100644
--- a/Templates/CMakeSystemConfig.cmake.in
+++ b/Templates/CMakeSystemConfig.cmake.in
@@ -25,5 +25,5 @@ SET (CMAKE_SHLIB_LD_LIBS "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE_NO_REPLAC
# support for X11
SET (CMAKE_X_LIBS "@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@" CACHE_NO_REPLACE )
SET (CMAKE_X_CFLAGS "@X_CFLAGS@" CACHE_NO_REPLACE)
-SET (CMAKE_HAS_X "@CMAKE_HAS_X@" CACHE_NO_REPLACE)
+SET (CMAKE_HAS_X "@CMAKE_HAS_X@" CACHE_NO_REPLACE BOOL)
diff --git a/configure b/configure
index 381a8db..78cf1c8 100755
--- a/configure
+++ b/configure
@@ -11,10 +11,6 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
-ac_help="$ac_help
- --with-x use the X Window System"
-ac_help="$ac_help
- --with-sproc use sproc instead of pthreads if possible"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -537,7 +533,7 @@ CMAKE_CONFIG_DIR=`pwd`
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:541: checking for $ac_word" >&5
+echo "configure:537: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -567,7 +563,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:571: checking for $ac_word" >&5
+echo "configure:567: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -618,7 +614,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:622: checking for $ac_word" >&5
+echo "configure:618: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -650,7 +646,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:654: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -661,12 +657,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 665 "configure"
+#line 661 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -692,12 +688,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:701: checking whether we are using GNU C" >&5
+echo "configure:697: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -706,7 +702,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -725,7 +721,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:729: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:725: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -761,7 +757,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:765: checking for $ac_word" >&5
+echo "configure:761: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -793,7 +789,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:797: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:793: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -804,12 +800,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 808 "configure"
+#line 804 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -835,12 +831,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:839: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:835: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:844: checking whether we are using GNU C++" >&5
+echo "configure:840: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -849,7 +845,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -868,7 +864,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:872: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:868: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -899,36 +895,6 @@ else
fi
fi
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:906: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="ranlib"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -960,7 +926,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:964: checking for a BSD compatible install" >&5
+echo "configure:930: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1012,1813 +978,11 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1017: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1032 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1038: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1049 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1055: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1066 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1072: \"$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
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
-else
- ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-# If we find X, set shell vars x_includes and x_libraries to the
-# paths, otherwise set no_x=yes.
-# Uses ac_ vars as temps to allow command line to override cache and checks.
-# --without-x overrides everything else, but does not touch the cache.
-echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1101: checking for X" >&5
-
-# Check whether --with-x or --without-x was given.
-if test "${with_x+set}" = set; then
- withval="$with_x"
- :
-fi
-
-# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
-if test "x$with_x" = xno; then
- # The user explicitly disabled X.
- have_x=disabled
-else
- if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
- # Both variables are already set.
- have_x=yes
- else
-if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- # One or both of the vars are not set, and there is no cached value.
-ac_x_includes=NO ac_x_libraries=NO
-rm -fr conftestdir
-if mkdir conftestdir; then
- cd conftestdir
- # Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat > Imakefile <<'EOF'
-acfindx:
- @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
-EOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
- eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- for ac_extension in a so sl; do
- if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
- test -f $ac_im_libdir/libX11.$ac_extension; then
- ac_im_usrlibdir=$ac_im_libdir; break
- fi
- done
- # Screen out bogus values from the imake configuration. They are
- # bogus both because they are the default anyway, and because
- # using them would break gcc on systems where it needs fixed includes.
- case "$ac_im_incroot" in
- /usr/include) ;;
- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
- esac
- case "$ac_im_usrlibdir" in
- /usr/lib | /lib) ;;
- *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
- esac
- fi
- cd ..
- rm -fr conftestdir
-fi
-
-if test "$ac_x_includes" = NO; then
- # Guess where to find include files, by looking for this one X11 .h file.
- test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
-
- # First, try using that file with no special directory specified.
-cat > conftest.$ac_ext <<EOF
-#line 1163 "configure"
-#include "confdefs.h"
-#include <$x_direct_test_include>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1168: \"$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*
- # We can compile using X headers with no special include directory.
-ac_x_includes=
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- # Look for the header file in a standard set of common directories.
-# Check X11 before X11Rn because it is often a symlink to the current release.
- for ac_dir in \
- /usr/X11/include \
- /usr/X11R6/include \
- /usr/X11R5/include \
- /usr/X11R4/include \
- \
- /usr/include/X11 \
- /usr/include/X11R6 \
- /usr/include/X11R5 \
- /usr/include/X11R4 \
- \
- /usr/local/X11/include \
- /usr/local/X11R6/include \
- /usr/local/X11R5/include \
- /usr/local/X11R4/include \
- \
- /usr/local/include/X11 \
- /usr/local/include/X11R6 \
- /usr/local/include/X11R5 \
- /usr/local/include/X11R4 \
- \
- /usr/X386/include \
- /usr/x386/include \
- /usr/XFree86/include/X11 \
- \
- /usr/include \
- /usr/local/include \
- /usr/unsupported/include \
- /usr/athena/include \
- /usr/local/x11r5/include \
- /usr/lpp/Xamples/include \
- \
- /usr/openwin/include \
- /usr/openwin/share/include \
- ; \
- do
- if test -r "$ac_dir/$x_direct_test_include"; then
- ac_x_includes=$ac_dir
- break
- fi
- done
-fi
-rm -f conftest*
-fi # $ac_x_includes = NO
-
-if test "$ac_x_libraries" = NO; then
- # Check for the libraries.
-
- test -z "$x_direct_test_library" && x_direct_test_library=Xt
- test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
-
- # See if we find them without any special options.
- # Don't add to $LIBS permanently.
- ac_save_LIBS="$LIBS"
- LIBS="-l$x_direct_test_library $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1237 "configure"
-#include "confdefs.h"
-
-int main() {
-${x_direct_test_function}()
-; return 0; }
-EOF
-if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
-# We can link X programs with no special library path.
-ac_x_libraries=
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- LIBS="$ac_save_LIBS"
-# First see if replacing the include by lib works.
-# Check X11 before X11Rn because it is often a symlink to the current release.
-for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
- /usr/X11/lib \
- /usr/X11R6/lib \
- /usr/X11R5/lib \
- /usr/X11R4/lib \
- \
- /usr/lib/X11 \
- /usr/lib/X11R6 \
- /usr/lib/X11R5 \
- /usr/lib/X11R4 \
- \
- /usr/local/X11/lib \
- /usr/local/X11R6/lib \
- /usr/local/X11R5/lib \
- /usr/local/X11R4/lib \
- \
- /usr/local/lib/X11 \
- /usr/local/lib/X11R6 \
- /usr/local/lib/X11R5 \
- /usr/local/lib/X11R4 \
- \
- /usr/X386/lib \
- /usr/x386/lib \
- /usr/XFree86/lib/X11 \
- \
- /usr/lib \
- /usr/local/lib \
- /usr/unsupported/lib \
- /usr/athena/lib \
- /usr/local/x11r5/lib \
- /usr/lpp/Xamples/lib \
- /lib/usr/lib/X11 \
- \
- /usr/openwin/lib \
- /usr/openwin/share/lib \
- ; \
-do
- for ac_extension in a so sl; do
- if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
- ac_x_libraries=$ac_dir
- break 2
- fi
- done
-done
-fi
-rm -f conftest*
-fi # $ac_x_libraries = NO
-
-if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
- # Didn't find X anywhere. Cache the known absence of X.
- ac_cv_have_x="have_x=no"
-else
- # Record where we found X for the cache.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
-fi
-fi
- fi
- eval "$ac_cv_have_x"
-fi # $with_x != no
-
-if test "$have_x" != yes; then
- echo "$ac_t""$have_x" 1>&6
- no_x=yes
-else
- # If each of the values was on the command line, it overrides each guess.
- test "x$x_includes" = xNONE && x_includes=$ac_x_includes
- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
- # Update the cache value to reflect the command line values.
- ac_cv_have_x="have_x=yes \
- ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
-fi
-
-if test "$no_x" = yes; then
- # Not all programs may use this symbol, but it does not hurt to define it.
- cat >> confdefs.h <<\EOF
-#define X_DISPLAY_MISSING 1
-EOF
-
- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
-else
- if test -n "$x_includes"; then
- X_CFLAGS="$X_CFLAGS -I$x_includes"
- fi
-
- # It would also be nice to do this for all -L options, not just this one.
- if test -n "$x_libraries"; then
- X_LIBS="$X_LIBS -L$x_libraries"
- # For Solaris; some versions of Sun CC require a space after -R and
- # others require no space. Words are not sufficient . . . .
- case "`(uname -sr) 2>/dev/null`" in
- "SunOS 5"*)
- echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:1350: checking whether -R must be followed by a space" >&5
- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
- cat > conftest.$ac_ext <<EOF
-#line 1353 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_R_nospace=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_R_nospace=no
-fi
-rm -f conftest*
- if test $ac_R_nospace = yes; then
- echo "$ac_t""no" 1>&6
- X_LIBS="$X_LIBS -R$x_libraries"
- else
- LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat > conftest.$ac_ext <<EOF
-#line 1376 "configure"
-#include "confdefs.h"
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_R_space=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_R_space=no
-fi
-rm -f conftest*
- if test $ac_R_space = yes; then
- echo "$ac_t""yes" 1>&6
- X_LIBS="$X_LIBS -R $x_libraries"
- else
- echo "$ac_t""neither works" 1>&6
- fi
- fi
- LIBS="$ac_xsave_LIBS"
- esac
- fi
-
- # Check for system-dependent libraries X programs must link with.
- # Do this before checking for the system-independent R6 libraries
- # (-lICE), since we may need -lsocket or whatever for X linking.
-
- if test "$ISC" = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
- else
- # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
- # libraries were built with DECnet support. And karl@cs.umb.edu says
- # the Alpha needs dnet_stub (dnet does not exist).
- echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:1415: checking for dnet_ntoa in -ldnet" >&5
-ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldnet $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1423 "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
- builtin and then its argument prototype would still apply. */
-char dnet_ntoa();
-
-int main() {
-dnet_ntoa()
-; return 0; }
-EOF
-if { (eval echo configure:1434: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:1456: checking for dnet_ntoa in -ldnet_stub" >&5
-ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldnet_stub $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1464 "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
- builtin and then its argument prototype would still apply. */
-char dnet_ntoa();
-
-int main() {
-dnet_ntoa()
-; return 0; }
-EOF
-if { (eval echo configure:1475: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
- # to get the SysV transport functions.
- # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
- # needs -lnsl.
- # The nsl library prevents programs from opening the X display
- # on Irix 5.2, according to dickey@clark.net.
- echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:1504: checking for gethostbyname" >&5
-if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1509 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
-choke me
-#else
-gethostbyname();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test $ac_cv_func_gethostbyname = no; then
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:1553: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1561 "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
- builtin and then its argument prototype would still apply. */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:1572: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- # lieder@skyler.mavd.honeywell.com says without -lsocket,
- # socket/setsockopt and other routines are undefined under SCO ODT
- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
- # on later versions), says simon@lia.di.epfl.ch: it contains
- # gethostby* variants that don't use the nameserver (or something).
- # -lsocket must be given before -lnsl if both are needed.
- # We assume that if connect needs -lnsl, so does gethostbyname.
- echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:1602: checking for connect" >&5
-if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1607 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char connect();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_connect) || defined (__stub___connect)
-choke me
-#else
-connect();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_connect=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_connect=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test $ac_cv_func_connect = no; then
- echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:1651: checking for connect in -lsocket" >&5
-ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1659 "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
- builtin and then its argument prototype would still apply. */
-char connect();
-
-int main() {
-connect()
-; return 0; }
-EOF
-if { (eval echo configure:1670: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
- echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:1694: checking for remove" >&5
-if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1699 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char remove(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char remove();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_remove) || defined (__stub___remove)
-choke me
-#else
-remove();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_remove=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_remove=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test $ac_cv_func_remove = no; then
- echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:1743: checking for remove in -lposix" >&5
-ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lposix $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1751 "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
- builtin and then its argument prototype would still apply. */
-char remove();
-
-int main() {
-remove()
-; return 0; }
-EOF
-if { (eval echo configure:1762: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
-
- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:1786: checking for shmat" >&5
-if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 1791 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shmat(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char shmat();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shmat) || defined (__stub___shmat)
-choke me
-#else
-shmat();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_shmat=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_shmat=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-fi
-
- if test $ac_cv_func_shmat = no; then
- echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:1835: checking for shmat in -lipc" >&5
-ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lipc $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1843 "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
- builtin and then its argument prototype would still apply. */
-char shmat();
-
-int main() {
-shmat()
-; return 0; }
-EOF
-if { (eval echo configure:1854: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
- fi
-
- # Check for libraries that X11R6 Xt/Xaw programs need.
- ac_save_LDFLAGS="$LDFLAGS"
- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
- # check for ICE first), but we must link in the order -lSM -lICE or
- # we get undefined symbols. So assume we have SM if we have ICE.
- # These have to be linked with before -lX11, unlike the other
- # libraries we check for below, so use a different variable.
- # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
- echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:1887: checking for IceConnectionNumber in -lICE" >&5
-ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lICE $X_EXTRA_LIBS $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1895 "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
- builtin and then its argument prototype would still apply. */
-char IceConnectionNumber();
-
-int main() {
-IceConnectionNumber()
-; return 0; }
-EOF
-if { (eval echo configure:1906: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- LDFLAGS="$ac_save_LDFLAGS"
-
-fi
-
fullSrcDir=`cd $srcdir; pwd`
CMAKE_ROOT_DIR=$fullSrcDir
-# get byte swapping info
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1937: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 1944 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:1955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 1959 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:1970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_bigendian=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
-fi
-rm -f conftest*
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
- cat > conftest.$ac_ext <<EOF
-#line 1990 "configure"
-#include "confdefs.h"
-main () {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
- ac_cv_c_bigendian=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
-if test $ac_cv_c_bigendian = yes; then
- CMAKE_WORDS_BIGENDIAN=1
-fi
-
-
-
-# some stuff Tcl uses
-#
-ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for limits.h""... $ac_c" 1>&6
-echo "configure:2036: checking for limits.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 2041 "configure"
-#include "confdefs.h"
-#include <limits.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2046: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- HAVE_LIMITS_H=-DHAVE_LIMITS_H
-else
- echo "$ac_t""no" 1>&6
-HAVE_LIMITS_H=""
-fi
-
-
-for ac_hdr in unistd.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2073: 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 2078 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2083: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- HAVE_UNISTD_H=-DHAVE_UNISTD_H
-else
- echo "$ac_t""no" 1>&6
-HAVE_UNISTD_H=""
-fi
-done
-
-
-
-# Step 1: set the variable "system" to hold the name and version number
-# for the system. This can usually be done via the "uname" command, but
-# there are a few systems, like Next, where this doesn't work.
-
-echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
-echo "configure:2117: checking system version (for dynamic loading)" >&5
-if test -f /usr/lib/NextStep/software_version; then
- system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-else
- system=`uname -s`-`uname -r`
- if test "$?" -ne 0 ; then
- echo "$ac_t""unknown (can't find uname command)" 1>&6
- system=unknown
- else
- # Special check for weird MP-RAS system (uname returns weird
- # results, and the version is kept in special file).
-
- if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
- fi
- echo "$ac_t""$system" 1>&6
- fi
-fi
-
-#
-# use shared libs
-#
-
-
-CMAKE_shared_ok="yes"
-# the following is an excerpt from the tcl7.5b2 configure.in
-#--------------------------------------------------------------------
-# The statements below define a collection of symbols related to
-# dynamic loading and shared libraries:
-#
-# CMAKE_SHLIB_CFLAGS - Flags to pass to cc when compiling the components
-# of a shared library (may request position-independent
-# code, among other things).
-# CMAKE_SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-# creating shared libraries. This symbol typically
-# goes at the end of the "ld" commands that build
-# shared libraries. The value of the symbol if
-# "${LIBS}" if all of the dependent libraries should
-# be specified when creating a shared library. If
-# dependent libraries should not be specified (as on
-# SunOS 4.x, where they cause the link to fail, or in
-# general if Tcl and Tk aren't themselves shared
-# libraries), then this symbol has an empty string
-# as its value.
-# CMAKE_SHLIB_SUFFIX - Suffix to use for the name of the shared library. An
-# empty string means we don't know how to use shared
-# libraries on this platform.
-# CMAKE_SHLIB_BUILD_FLAGS -
-# Flags to use when building a shared library.
-# CMAKE_SHLIB_LINK_FLAGS -
-# Flags to pass to the compiler when linking object
-# files into an executable application binary such
-# as tclsh.
-#--------------------------------------------------------------------
-
-
-# Step 2: check for existence of -ldl library. This is needed because
-# Linux can use either -ldl or -ldld for dynamic loading.
-
-echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2177: checking for dlopen in -ldl" >&5
-ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ldl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2185 "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
- builtin and then its argument prototype would still apply. */
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-if { (eval echo configure:2196: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- have_dl=yes
-else
- echo "$ac_t""no" 1>&6
-have_dl=no
-fi
-
-
-# Step 4: set configuration options based on system name and version.
-
-fullSrcDir=`cd $srcdir; pwd`
-
-case $system in
- AIX-*)
- # AIX: can't link shared library extensions unless Tcl and Tk are
- # also shared libraries.
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS='${LIBS}'
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- echo $ac_n "checking for printf in -lld""... $ac_c" 1>&6
-echo "configure:2231: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lld $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2239 "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
- builtin and then its argument prototype would still apply. */
-char printf();
-
-int main() {
-printf()
-; return 0; }
-EOF
-if { (eval echo configure:2250: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_DL_LIBS="-lld"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
- CMAKE_SHLIB_CFLAGS="+z"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".sl"
- CMAKE_DL_LIBS="-ldld"
- CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -Wl,-b'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
- 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 -Wl,+b,${LIB_RUNTIME_DIR}'
- fi
- ;;
- IRIX-5.*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
- ;;
- IRIX-6* | IRIX64-6* | IRIX-64-6*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
- ;;
- Linux*)
- CMAKE_SHLIB_CFLAGS="-fPIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_SHLIB_BUILD_FLAGS="-shared"
- if test "$have_dl" = yes; then
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
- else
- ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for dld.h""... $ac_c" 1>&6
-echo "configure:2309: 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 2314 "configure"
-#include "confdefs.h"
-#include <dld.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2319: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- CMAKE_DL_LIBS="-ldld"
- CMAKE_SHLIB_LINK_FLAGS=""
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
- ;;
- CYGWIN_NT*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_DL_LIBS="-lgdi32"
- CMAKE_SHLIB_SUFFIX=".dll"
- CMAKE_SHLIB_LINK_FLAGS="-shared"
- ;;
- MP-RAS-02*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- MP-RAS-*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
- ;;
- NetBSD-*|FreeBSD-*)
- # Not available on all versions: check for include file.
- if test -f /usr/include/dlfcn.h; then
- CMAKE_SHLIB_CFLAGS="-fpic"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-shared"
- else
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- fi
- ;;
- NEXTSTEP-*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-1.012)
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- CMAKE_SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- CMAKE_SHLIB_CFLAGS="-fpic"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-V*)
- # Digital OSF/1
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,"*"'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- ;;
- RISCos-*)
- CMAKE_SHLIB_CFLAGS="-G 0"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
- ;;
- SCO_SV-3.2*)
- # Note, dlopen is available only on SCO 3.2.5 and greater. However,
- # this test works, since "uname -s" was non-standard in 3.2.4 and
- # below.
- CMAKE_SHLIB_CFLAGS="-Kpic -belf"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
- ;;
- SINIX*5.4*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- SunOS-4*)
- CMAKE_SHLIB_CFLAGS="-PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-L${LIB_RUNTIME_DIR}'
- ;;
- SunOS-5*)
- CMAKE_SHLIB_CFLAGS="-KPIC"
- CMAKE_SHLIB_LD_LIBS='${LIBS}'
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_BUILD_FLAGS='-G'
- CMAKE_SHLIB_LINK_FLAGS='-R ${LIB_RUNTIME_DIR}'
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- fi
- ;;
- ULTRIX-4.*)
- CMAKE_SHLIB_CFLAGS="-G 0"
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
- ;;
- UNIX_SV*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
- ;;
-esac
-export CMAKE_SHLIB_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
-# standard manufacturer compiler.
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- CMAKE_SHLIB_CFLAGS="-fPIC"
-fi
-# if running on cygwin remove -fPIC flag
-case $system in
- CYGWIN_NT*)
- CMAKE_SHLIB_CFLAGS=""
- ;;
-esac
-
-CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
-CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
-
-
-
-
-
-
-
-
-
-
-
-##########################
-## ##
-## Check thread support ##
-## ##
-##########################
-# initialize thread vars
-CMAKE_THREAD_LIBS=""
-use_sproc=no
-CMAKE_USE_SPROC=0
-CMAKE_USE_PTHREADS=0
-CMAKE_HP_PTHREADS=0
-
-##########################
-## ##
-## sproc ##
-## ##
-##########################
-# check for sproc
-force_sproc=no
-# Check whether --with-sproc or --without-sproc was given.
-if test "${with_sproc+set}" = set; then
- withval="$with_sproc"
- if test "$withval" = yes; then
- force_sproc=yes
- fi
-fi
-
-
-
-
-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:2534: 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 2539 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2544: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- use_sproc=yes
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-if test "$use_sproc" = "yes"; then
-case $system in
- Linux* | IRIX64-6.5 | IRIX-6.5)
- if test "$force_sproc" = "yes"; then
- CMAKE_USE_SPROC=1
- else
- use_sproc=no
- fi
- ;;
- IRIX*)
- CMAKE_USE_SPROC=1
- ;;
-esac
-fi
-use_pthreads=no
-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:2589: 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 2594 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2599: \"$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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- use_pthreads=yes
-else
- echo "$ac_t""no" 1>&6
-fi
-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:2628: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lpthreads $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2636 "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
- builtin and then its argument prototype would still apply. */
-char pthread_create();
-
-int main() {
-pthread_create()
-; return 0; }
-EOF
-if { (eval echo configure:2647: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_THREAD_LIBS="-lpthreads"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2668: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lpthread $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2676 "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
- builtin and then its argument prototype would still apply. */
-char pthread_create();
-
-int main() {
-pthread_create()
-; return 0; }
-EOF
-if { (eval echo configure:2687: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_THREAD_LIBS="-lpthread"
-else
- echo "$ac_t""no" 1>&6
-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:2710: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lthread $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2718 "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
- builtin and then its argument prototype would still apply. */
-char thr_create();
-
-int main() {
-thr_create()
-; return 0; }
-EOF
-if { (eval echo configure:2729: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread"
-else
- echo "$ac_t""no" 1>&6
-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:2752: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lthread $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2760 "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
- builtin and then its argument prototype would still apply. */
-char thr_create();
-
-int main() {
-thr_create()
-; return 0; }
-EOF
-if { (eval echo configure:2771: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread"
-else
- echo "$ac_t""no" 1>&6
-fi
-
- fi
- CMAKE_USE_PTHREADS=1
- fi
-fi
-
-# on an HP with pthread we need to use -lcma
-# on dec alphas we have had problems as well
-if test "$use_pthreads" = "yes"; then
-case $system in
- HP-UX-*.10.*)
- CMAKE_THREAD_LIBS="-lcma"
- CMAKE_USE_PTHREADS=1
- CMAKE_HP_PTHREADS=1
- ;;
- OSF1-V*)
- CMAKE_USE_PTHREADS=0
- CMAKE_THREAD_LIBS=""
- ;;
- FreeBSD*)
- CMAKE_USE_PTHREADS=0
- CMAKE_THREAD_LIBS=""
- ;;
-esac
-fi
-
-
-
-
-
-
-
-
CMAKE_ANSI_CFLAGS=""
# on hp use -Aa for ansi
if test $ac_cv_prog_gxx = no; then
@@ -2866,8 +1030,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:2870: checking ansi standard C++ stream headers " >&5
- echo "******"
+echo "configure:1034: checking ansi standard C++ stream headers " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
@@ -2876,7 +1039,7 @@ echo "configure:2870: checking ansi standard C++ stream headers " >&5
echo "$ac_t""yes" 1>&6
else
cat >> confdefs.h <<\EOF
-#define CMAKE_NO_STD_NAMESPACE 1
+#define CMAKE_NO_ANSI_STREAM_HEADERS 1
EOF
echo "$ac_t""no" 1>&6
@@ -2887,7 +1050,7 @@ fi
if test $ac_cv_prog_gxx = no; then
echo "******"
echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
-echo "configure:2891: checking ansi standard namespace support " >&5
+echo "configure:1054: checking ansi standard namespace support " >&5
rm -rf conftest.*
cat > conftest.cc <<!
#include <list>
@@ -2897,7 +1060,7 @@ void foo() { std::list<int> l; }
echo "$ac_t""yes" 1>&6
else
cat >> confdefs.h <<\EOF
-#define CMAKE_NO_ANSI_STREAM_HEADERS 1
+#define CMAKE_NO_STD_NAMESPACE 1
EOF
echo "$ac_t""no" 1>&6
@@ -2905,96 +1068,6 @@ EOF
fi
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- SHLIB_CFLAGS="-fPIC"
-fi
-
-# find make to use to build cmake, prefer gmake
-for ac_prog in gmake make
-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:2919: 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
- case "$RUNMAKE" in
- /*)
- ac_cv_path_RUNMAKE="$RUNMAKE" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_RUNMAKE="$RUNMAKE" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_RUNMAKE="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-fi
-RUNMAKE="$ac_cv_path_RUNMAKE"
-if test -n "$RUNMAKE"; then
- echo "$ac_t""$RUNMAKE" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$RUNMAKE" && break
-done
-
-for ac_prog in ar
-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:2959: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- case "$CMAKE_AR" in
- /*)
- ac_cv_path_CMAKE_AR="$CMAKE_AR" # Let the user override the test with a path.
- ;;
- ?:/*)
- ac_cv_path_CMAKE_AR="$CMAKE_AR" # Let the user override the test with a dos path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_CMAKE_AR="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-fi
-CMAKE_AR="$ac_cv_path_CMAKE_AR"
-if test -n "$CMAKE_AR"; then
- echo "$ac_t""$CMAKE_AR" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CMAKE_AR" && break
-done
-
-
-
-# generate output files.
-# create mkdir files just to make some of the directories
-
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -3131,35 +1204,12 @@ s%@mandir@%$mandir%g
s%@CMAKE_CONFIG_DIR@%$CMAKE_CONFIG_DIR%g
s%@CC@%$CC%g
s%@CXX@%$CXX%g
-s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@CPP@%$CPP%g
-s%@X_CFLAGS@%$X_CFLAGS%g
-s%@X_PRE_LIBS@%$X_PRE_LIBS%g
-s%@X_LIBS@%$X_LIBS%g
-s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
s%@CMAKE_ROOT_DIR@%$CMAKE_ROOT_DIR%g
-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_SHLIB_LINK_FLAGS@%$CMAKE_SHLIB_LINK_FLAGS%g
-s%@CMAKE_SHLIB_BUILD_FLAGS@%$CMAKE_SHLIB_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_USE_SPROC@%$CMAKE_USE_SPROC%g
-s%@CMAKE_USE_PTHREADS@%$CMAKE_USE_PTHREADS%g
-s%@CMAKE_HP_PTHREADS@%$CMAKE_HP_PTHREADS%g
-s%@CMAKE_THREAD_LIBS@%$CMAKE_THREAD_LIBS%g
s%@CMAKE_ANSI_CFLAGS@%$CMAKE_ANSI_CFLAGS%g
s%@CMAKE_TEMPLATE_FLAGS@%$CMAKE_TEMPLATE_FLAGS%g
-s%@RUNMAKE@%$RUNMAKE%g
-s%@CMAKE_AR@%$CMAKE_AR%g
CEOF
EOF
diff --git a/configure.in b/configure.in
index b7b0acb..a3a5ee2 100644
--- a/configure.in
+++ b/configure.in
@@ -11,391 +11,12 @@ AC_SUBST(CMAKE_CONFIG_DIR)
#
AC_PROG_CC
AC_PROG_CXX
-AC_PROG_RANLIB
AC_PROG_INSTALL
-AC_PATH_XTRA
fullSrcDir=`cd $srcdir; pwd`
CMAKE_ROOT_DIR=$fullSrcDir
AC_SUBST(CMAKE_ROOT_DIR)
-# get byte swapping info
-AC_C_BIGENDIAN
-if test $ac_cv_c_bigendian = yes; then
- CMAKE_WORDS_BIGENDIAN=1
-fi
-AC_SUBST(CMAKE_WORDS_BIGENDIAN)
-
-
-# some stuff Tcl uses
-#
-AC_CHECK_HEADER(limits.h, HAVE_LIMITS_H=-DHAVE_LIMITS_H,HAVE_LIMITS_H="")
-AC_SUBST(CMAKE_HAVE_LIMITS_H)
-AC_HAVE_HEADERS(unistd.h, HAVE_UNISTD_H=-DHAVE_UNISTD_H,HAVE_UNISTD_H="")
-AC_SUBST(CMAKE_HAVE_UNISTD_H)
-
-# Step 1: set the variable "system" to hold the name and version number
-# for the system. This can usually be done via the "uname" command, but
-# there are a few systems, like Next, where this doesn't work.
-
-AC_MSG_CHECKING([system version (for dynamic loading)])
-if test -f /usr/lib/NextStep/software_version; then
- system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-else
- system=`uname -s`-`uname -r`
- if test "$?" -ne 0 ; then
- AC_MSG_RESULT([unknown (can't find uname command)])
- system=unknown
- else
- # Special check for weird MP-RAS system (uname returns weird
- # results, and the version is kept in special file).
-
- if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
- fi
- AC_MSG_RESULT($system)
- fi
-fi
-
-#
-# use shared libs
-#
-
-
-CMAKE_shared_ok="yes"
-# the following is an excerpt from the tcl7.5b2 configure.in
-#--------------------------------------------------------------------
-# The statements below define a collection of symbols related to
-# dynamic loading and shared libraries:
-#
-# CMAKE_SHLIB_CFLAGS - Flags to pass to cc when compiling the components
-# of a shared library (may request position-independent
-# code, among other things).
-# CMAKE_SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
-# creating shared libraries. This symbol typically
-# goes at the end of the "ld" commands that build
-# shared libraries. The value of the symbol if
-# "${LIBS}" if all of the dependent libraries should
-# be specified when creating a shared library. If
-# dependent libraries should not be specified (as on
-# SunOS 4.x, where they cause the link to fail, or in
-# general if Tcl and Tk aren't themselves shared
-# libraries), then this symbol has an empty string
-# as its value.
-# CMAKE_SHLIB_SUFFIX - Suffix to use for the name of the shared library. An
-# empty string means we don't know how to use shared
-# libraries on this platform.
-# CMAKE_SHLIB_BUILD_FLAGS -
-# Flags to use when building a shared library.
-# CMAKE_SHLIB_LINK_FLAGS -
-# Flags to pass to the compiler when linking object
-# files into an executable application binary such
-# as tclsh.
-#--------------------------------------------------------------------
-
-
-# Step 2: check for existence of -ldl library. This is needed because
-# Linux can use either -ldl or -ldld for dynamic loading.
-
-AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-# Step 4: set configuration options based on system name and version.
-
-fullSrcDir=`cd $srcdir; pwd`
-AC_SUBST(fullSrcDir)
-case $system in
- AIX-*)
- # AIX: can't link shared library extensions unless Tcl and Tk are
- # also shared libraries.
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS='${LIBS}'
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- AC_CHECK_LIB(ld,printf, CMAKE_DL_LIBS="-lld")
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
- CMAKE_SHLIB_CFLAGS="+z"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".sl"
- CMAKE_DL_LIBS="-ldld"
- CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -Wl,-b'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
- 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 -Wl,+b,${LIB_RUNTIME_DIR}'
- fi
- ;;
- IRIX-5.*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
- ;;
- IRIX-6* | IRIX64-6* | IRIX-64-6*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
- ;;
- Linux*)
- CMAKE_SHLIB_CFLAGS="-fPIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_SHLIB_BUILD_FLAGS="-shared"
- if test "$have_dl" = yes; then
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
- else
- AC_CHECK_HEADER(dld.h, [
- CMAKE_DL_LIBS="-ldld"
- CMAKE_SHLIB_LINK_FLAGS=""])
- fi
- ;;
- CYGWIN_NT*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_DL_LIBS="-lgdi32"
- CMAKE_SHLIB_SUFFIX=".dll"
- CMAKE_SHLIB_LINK_FLAGS="-shared"
- ;;
- MP-RAS-02*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- MP-RAS-*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
- ;;
- NetBSD-*|FreeBSD-*)
- # Not available on all versions: check for include file.
- if test -f /usr/include/dlfcn.h; then
- CMAKE_SHLIB_CFLAGS="-fpic"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-shared"
- else
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- fi
- ;;
- NEXTSTEP-*)
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-1.[012])
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- CMAKE_SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- CMAKE_SHLIB_CFLAGS="-fpic"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- OSF1-V*)
- # Digital OSF/1
- CMAKE_SHLIB_CFLAGS=""
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,"*"'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- ;;
- RISCos-*)
- CMAKE_SHLIB_CFLAGS="-G 0"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
- ;;
- SCO_SV-3.2*)
- # Note, dlopen is available only on SCO 3.2.5 and greater. However,
- # this test works, since "uname -s" was non-standard in 3.2.4 and
- # below.
- CMAKE_SHLIB_CFLAGS="-Kpic -belf"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
- ;;
- SINIX*5.4*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS=""
- ;;
- SunOS-4*)
- CMAKE_SHLIB_CFLAGS="-PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-L${LIB_RUNTIME_DIR}'
- ;;
- SunOS-5*)
- CMAKE_SHLIB_CFLAGS="-KPIC"
- CMAKE_SHLIB_LD_LIBS='${LIBS}'
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_BUILD_FLAGS='-G'
- CMAKE_SHLIB_LINK_FLAGS='-R ${LIB_RUNTIME_DIR}'
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
- CMAKE_SHLIB_LINK_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- fi
- ;;
- ULTRIX-4.*)
- CMAKE_SHLIB_CFLAGS="-G 0"
- CMAKE_SHLIB_SUFFIX="..o"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_DL_LIBS=""
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
- ;;
- UNIX_SV*)
- CMAKE_SHLIB_CFLAGS="-K PIC"
- CMAKE_SHLIB_LD_LIBS=""
- CMAKE_SHLIB_SUFFIX=".so"
- CMAKE_DL_LIBS="-ldl"
- CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
- ;;
-esac
-export CMAKE_SHLIB_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
-# standard manufacturer compiler.
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- CMAKE_SHLIB_CFLAGS="-fPIC"
-fi
-# if running on cygwin remove -fPIC flag
-case $system in
- CYGWIN_NT*)
- CMAKE_SHLIB_CFLAGS=""
- ;;
-esac
-
-CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
-CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
-
-
-AC_SUBST(CMAKE_SHLIB_LINK_FLAGS)
-AC_SUBST(CMAKE_SHLIB_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)
-
-
-##########################
-## ##
-## Check thread support ##
-## ##
-##########################
-# initialize thread vars
-CMAKE_THREAD_LIBS=""
-use_sproc=no
-CMAKE_USE_SPROC=0
-CMAKE_USE_PTHREADS=0
-CMAKE_HP_PTHREADS=0
-
-##########################
-## ##
-## sproc ##
-## ##
-##########################
-# check for sproc
-force_sproc=no
-AC_ARG_WITH(sproc,
- [ --with-sproc use sproc instead of pthreads if possible],
- if test "$withval" = yes; then
- force_sproc=yes
- fi,)
-
-
-
-AC_CHECK_HEADERS(sys/prctl.h, [use_sproc=yes])
-if test "$use_sproc" = "yes"; then
-case $system in
- Linux* | IRIX64-6.5 | IRIX-6.5)
- if test "$force_sproc" = "yes"; then
- CMAKE_USE_SPROC=1
- else
- use_sproc=no
- fi
- ;;
- IRIX*)
- CMAKE_USE_SPROC=1
- ;;
-esac
-fi
-use_pthreads=no
-AC_CHECK_HEADERS(pthread.h, [use_pthreads=yes])
-if test "$use_pthreads" = "yes"; then
- if test "$use_sproc" = "no"; then
- AC_CHECK_LIB(pthreads, pthread_create, CMAKE_THREAD_LIBS="-lpthreads")
- AC_CHECK_LIB(pthread, pthread_create, CMAKE_THREAD_LIBS="-lpthread")
-# Work around Solaris 5.6 and 5.7 bug:
- if test "`uname -s -r`" = "SunOS 5.6"; then
- AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
- fi
- if test "`uname -s -r`" = "SunOS 5.7"; then
- AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
- fi
- CMAKE_USE_PTHREADS=1
- fi
-fi
-
-# on an HP with pthread we need to use -lcma
-# on dec alphas we have had problems as well
-if test "$use_pthreads" = "yes"; then
-case $system in
- HP-UX-*.10.*)
- CMAKE_THREAD_LIBS="-lcma"
- CMAKE_USE_PTHREADS=1
- CMAKE_HP_PTHREADS=1
- ;;
- OSF1-V*)
- CMAKE_USE_PTHREADS=0
- CMAKE_THREAD_LIBS=""
- ;;
- FreeBSD*)
- CMAKE_USE_PTHREADS=0
- CMAKE_THREAD_LIBS=""
- ;;
-esac
-fi
-
-
-AC_SUBST(CMAKE_USE_SPROC)
-AC_SUBST(CMAKE_USE_PTHREADS)
-AC_SUBST(CMAKE_HP_PTHREADS)
-AC_SUBST(CMAKE_THREAD_LIBS)
-
-
CMAKE_ANSI_CFLAGS=""
# on hp use -Aa for ansi
if test $ac_cv_prog_gxx = no; then
@@ -443,7 +64,6 @@ AC_SUBST(CMAKE_TEMPLATE_FLAGS)
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
AC_MSG_CHECKING( ansi standard C++ stream headers )
- echo "******"
rm -rf conftest.*
cat > conftest.cc <<!
#include <iostream>
@@ -451,7 +71,7 @@ if test $ac_cv_prog_gxx = no; then
if test -z "`${CXX} -c conftest.cc 2>&1`"; then
echo "$ac_t""yes" 1>&6
else
- AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
+ AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
echo "$ac_t""no" 1>&6
fi
fi
@@ -468,23 +88,11 @@ void foo() { std::list<int> l; }
if test -z "`${CXX} -c conftest.cc 2>&1`"; then
echo "$ac_t""yes" 1>&6
else
- AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
+ AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
echo "$ac_t""no" 1>&6
fi
fi
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
- SHLIB_CFLAGS="-fPIC"
-fi
-
-# find make to use to build cmake, prefer gmake
-AC_PATH_PROGS(RUNMAKE, gmake make)
-AC_PATH_PROGS(CMAKE_AR, ar)
-AC_SUBST(CMAKE_AR)
-
-# generate output files.
-# create mkdir files just to make some of the directories
-
AC_OUTPUT(Makefile Source/Makefile)