From 63d5a9c489777fc0ece7cda1dd36283ca95c4909 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 16 Oct 2017 19:56:04 -0400 Subject: [PATCH] Updates and fixes to the configuration file definitions for Mac OSX using MacPorts, with considerable help from Ryan Schmidt. --- defs.mak | 6 +- scripts/config.log | 20 +- scripts/config.status | 4 +- scripts/configure | 4 +- scripts/configure.in | 4 +- scripts/configure.in.orig | 1758 ------------------------------------- scripts/defs.mak | 6 +- tiles/.search2.c.swp | Bin 16384 -> 0 bytes 8 files changed, 22 insertions(+), 1780 deletions(-) delete mode 100644 scripts/configure.in.orig delete mode 100644 tiles/.search2.c.swp diff --git a/defs.mak b/defs.mak index e50e8a66..d94efcf2 100644 --- a/defs.mak +++ b/defs.mak @@ -62,16 +62,16 @@ LIB_SPECS_NOSTUB = -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6 WISH_EXE = /usr/bin/wish TCL_LIB_DIR = /usr/lib MAGIC_VERSION = 8.2 -MAGIC_REVISION = 34 +MAGIC_REVISION = 36 CC = gcc CPP = gcc -E CXX = g++ CPPFLAGS = -I. -I${MAGICDIR} -DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DUSE_TCL_STUBS -DUSE_TK_STUBS -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"34\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" +DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DUSE_TCL_STUBS -DUSE_TK_STUBS -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"36\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" DFLAGS += -DSHDLIB_EXT=\".so\" -DNDEBUG -DFLAGS_NOSTUB = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"34\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" +DFLAGS_NOSTUB = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"36\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" DFLAGS_NOSTUB += -DSHDLIB_EXT=\".so\" -DNDEBUG CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC diff --git a/scripts/config.log b/scripts/config.log index e6c296a3..8cc879e1 100644 --- a/scripts/config.log +++ b/scripts/config.log @@ -125,7 +125,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | /* end confdefs.h. */ | #include configure:3476: result: gcc -E @@ -146,7 +146,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | /* end confdefs.h. */ | #include configure:3596: checking for g++ @@ -302,7 +302,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -343,7 +343,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -433,7 +433,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -506,7 +506,7 @@ configure: failed program was: | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define MAGIC_VERSION "8.2" -| #define MAGIC_REVISION "34" +| #define MAGIC_REVISION "36" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 @@ -634,7 +634,7 @@ configure:7575: checking for cairo_user_to_device in -lcairo configure:7600: gcc -o conftest -g -lm conftest.c -lcairo -lGLU -lGL >&5 configure:7600: $? = 0 configure:7609: result: yes -configure:8416: creating ./config.status +configure:8414: creating ./config.status ## ---------------------- ## ## Running config.status. ## @@ -759,7 +759,7 @@ CPPFLAGS='' CSH='/bin/csh' CXX='g++' CXXFLAGS='-g -O2' -DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"34\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1' +DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"36\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1' DEPEND_FLAG='-MM' ECHO_C='' ECHO_N='printf' @@ -784,7 +784,7 @@ LIB_SPECS=' -L/usr/lib64 -ltkstub8.6 -L/usr/lib64 -ltclstub8.6' LIB_SPECS_NOSTUB=' -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6' LTLIBOBJS='' M4='/bin/m4' -MAGIC_REVISION='34' +MAGIC_REVISION='36' MAGIC_VERSION='8.2' MCPP='${MAGICDIR}/scripts/preproc.py' OA='' @@ -886,7 +886,7 @@ unused=' readline lisp' #define PACKAGE_BUGREPORT "" #define PACKAGE_URL "" #define MAGIC_VERSION "8.2" -#define MAGIC_REVISION "34" +#define MAGIC_REVISION "36" #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 diff --git a/scripts/config.status b/scripts/config.status index 26b5c45a..0abcdd41 100755 --- a/scripts/config.status +++ b/scripts/config.status @@ -588,7 +588,7 @@ S["INSTALL_TARGET"]="install-tcl" S["ALL_TARGET"]="tcl" S["OA_LIBS"]="" S["OA"]="" -S["MAGIC_REVISION"]="34" +S["MAGIC_REVISION"]="36" S["MAGIC_VERSION"]="8.2" S["SCPP"]="gcc -E -x c" S["MCPP"]="${MAGICDIR}/scripts/preproc.py" @@ -676,7 +676,7 @@ S["ECHO_T"]="" S["ECHO_N"]="-n" S["ECHO_C"]="" S["DEFS"]="-DPACKAGE_NAME=\\\"\\\" -DPACKAGE_TARNAME=\\\"\\\" -DPACKAGE_VERSION=\\\"\\\" -DPACKAGE_STRING=\\\"\\\" -DPACKAGE_BUGREPORT=\\\"\\\" -DPACKAGE_URL=\\\"\\\" -DMAGIC_VERSION="\ -"\\\"8.2\\\" -DMAGIC_REVISION=\\\"34\\\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHA"\ +"\\\"8.2\\\" -DMAGIC_REVISION=\\\"36\\\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHA"\ "VE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_U"\ "NSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE"\ "_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHA"\ diff --git a/scripts/configure b/scripts/configure index 4471b004..50366044 100755 --- a/scripts/configure +++ b/scripts/configure @@ -7920,9 +7920,9 @@ if test $usingTcl ; then *darwin*) SHDLIB_EXT=".dylib" - LDDL_FLAGS="-dynamiclib -flat_namespace -undefined suppress -noprebind" + LDDL_FLAGS="-dynamiclib -undefined dynamic_lookup" LDFLAGS="${LDFLAGS} ${LIB_SPECS}" - CFLAGS="${CFLAGS} ${X_CFLAGS} ${INC_SPECS} -I/sw/include -fno-common" + CFLAGS="${CFLAGS} ${X_CFLAGS} ${INC_SPECS}" ;; *cygwin*) diff --git a/scripts/configure.in b/scripts/configure.in index 071dacb1..16eef189 100644 --- a/scripts/configure.in +++ b/scripts/configure.in @@ -1508,9 +1508,9 @@ if test $usingTcl ; then *darwin*) SHDLIB_EXT=".dylib" - LDDL_FLAGS="-dynamiclib -flat_namespace -undefined suppress -noprebind" + LDDL_FLAGS="-dynamiclib -undefined dynamic_lookup" LDFLAGS="${LDFLAGS} ${LIB_SPECS}" - CFLAGS="${CFLAGS} ${X_CFLAGS} ${INC_SPECS} -I/sw/include -fno-common" + CFLAGS="${CFLAGS} ${X_CFLAGS} ${INC_SPECS}" ;; *cygwin*) diff --git a/scripts/configure.in.orig b/scripts/configure.in.orig deleted file mode 100644 index 1bd1efab..00000000 --- a/scripts/configure.in.orig +++ /dev/null @@ -1,1758 +0,0 @@ -dnl Process this file with autoconf to produce a configure script. -dnl Use autoconf 2.52 or newer. - -AC_INIT(magic,, magic-hackers@csl.cornell.edu) -AC_PREREQ(2.52) -AC_CONFIG_SRCDIR(rules.mak) -AC_CONFIG_AUX_DIR(.) - -AC_CANONICAL_SYSTEM - -dnl pass the version string on the the makefiles -PACKAGE=magic - -MAGIC_VERSION=`cat ../VERSION | cut -d. -f1-2` -MAGIC_REVISION=`cat ../VERSION | cut -d. -f3` -AC_DEFINE_UNQUOTED(MAGIC_VERSION, "${MAGIC_VERSION}") -AC_DEFINE_UNQUOTED(MAGIC_REVISION, "${MAGIC_REVISION}") - -dnl Override default target when compiling under TCL -ALL_TARGET="standard" -INSTALL_TARGET="install-magic" - -dnl Checks for programs. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_ISC_POSIX -AC_PROG_INSTALL -AC_PROG_RANLIB - -dnl GNU M4 is preferred due to some of the option switches. -AC_PATH_PROGS([M4], [gm4 gnum4 m4], [no]) -if test x$M4 = xno; then - AC_MSG_ERROR([M4 is required]) -fi - -dnl check size of pointer for correct behavior on 64-bit systems -dnl If the C preprocessor is GCC, we need to force the flag to -dnl assert that input files are of type C, or else the preprocessing -dnl stage will not execute correctly on the ".in" files in the scmos -dnl directory. - -if test "$CPP" = "$CC -E" ; then - CPP="$CPP -x c" -fi - -dnl check if the linker is a GNU linker - -#------------------------------------------------------------ -# AC_PROG_LD - find the path to the GNU or non-GNU linker -# (This stuff ripped from libtool) -#------------------------------------------------------------ -AC_DEFUN([AC_PROG_LD], -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [[default=no]]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -dnl ###not for PostgreSQL### AC_REQUIRE([AC_CANONICAL_BUILD])dnl -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case "$ac_prog" in - # Accept absolute paths. -changequote(,)dnl - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' -changequote([,])dnl - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(ac_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - ac_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then - test "$with_gnu_ld" != no && break - else - test "$with_gnu_ld" != yes && break - fi - fi - done - IFS="$ac_save_ifs" -else - ac_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$ac_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_PROG_LD_GNU -]) - -AC_DEFUN([AC_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 &5; then - ac_cv_prog_gnu_ld=yes -else - ac_cv_prog_gnu_ld=no -fi]) -with_gnu_ld=$ac_cv_prog_gnu_ld -]) - -AC_PROG_LD - -AC_CHECK_SIZEOF([void *], 4) -AC_CHECK_SIZEOF([unsigned int], 4) -AC_CHECK_SIZEOF([unsigned long], 4) -AC_CHECK_SIZEOF([unsigned long long], 8) - -dnl Check byte arrangement for doubleint routines -AC_C_BIGENDIAN - -dnl Check for required header files -AC_HEADER_STDC - -dnl Need either setenv or putenv -AC_CHECK_FUNCS(setenv putenv) - -dnl Check for vfork -AC_CHECK_FUNC(vfork) - -dnl Check for -AC_CHECK_HEADERS(sys/mman.h) - -dnl Check for -AC_CHECK_HEADERS(dirent.h) - -dnl Check for -AC_CHECK_HEADERS(limits.h) - -dnl Check for -AC_CHECK_HEADERS(param.h) - -dnl Check for -AC_CHECK_HEADERS(paths.h) - -dnl Check for va_copy -AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy, - AC_TRY_LINK( - [#include ], - [va_list ap1, ap2; - va_copy(ap1,ap2); - ], - [ac_cv_c_va_copy="yes"], - [ac_cv_c_va_copy="no"]) - ) -if test "$ac_cv_c_va_copy" = "yes" -then - AC_DEFINE(HAVE_VA_COPY, 1, [Define if we have va_copy]) -fi -AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy, - AC_TRY_LINK( - [#include ], - [va_list ap1, ap2; - __va_copy(ap1,ap2); - ], - [ac_cv_c___va_copy="yes"], - [ac_cv_c___va_copy="no"]) - ) -if test "$ac_cv_c___va_copy" = "yes" -then - AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy]) -fi - -dnl Check for some C99 functions - -dnl Built-in round/roundf require CFLAGS -std=c99, but this also -dnl requires that all functions be declared explicitly! For now, -dnl built-in functions are disabled, with macros used instead. - -dnl NOTE---Bug in the x86_64 math library; round() and roundf() are incorrect. - -case $target in - *x86_64*) ;; - *) - AC_CACHE_CHECK([for built-in roundf], ac_cv_c_roundf, - AC_TRY_LINK( - [#include ], - [float f; - f = roundf(1.5); - ], - [ac_cv_c_roundf="yes"], - [ac_cv_c_roundf="no"]) - ) - if test "$ac_cv_c_roundf" = "no" - then - # Check fo C99 function from libm - AC_CHECK_LIB([m],[roundf],[AC_DEFINE([HAVE_ROUNDF],[1],["c99 function"])]) - fi - - AC_CACHE_CHECK([for built-in round], ac_cv_c_round, - AC_TRY_LINK( - [#include ], - [double d; - d = round(1.5); - ], - [ac_cv_c_round="yes"], - [ac_cv_c_round="no"]) - ) - if test "$ac_cv_c_round" = "no" - then - # Check fo C99 function from libm - AC_CHECK_LIB([m],[round],[AC_DEFINE([HAVE_ROUND],[1],["c99 function"])]) - fi - ;; -esac - -extra_defs="$extra_defs -DCAD_DIR=\\\"\${LIBDIR}\\\" -DBIN_DIR=\\\"\${BINDIR}\\\"" -X_LIBS= -X_CFLAGS= -CPPFLAGS= -INC_SPECS= -DEPEND_FLAG= -SHLIB_CFLAGS="" -LD_RUN_PATH="" -WISH_EXE="" -TCLSH_EXE="" - -modules="" -unused="" -cadinstall="" -extra_libs="" -top_extra_libs="" -sub_extra_libs="" -ld_extra_libs="" -ld_extra_objs="" -programs="" -rl_defs= -rl_libs= -gr_cflags= -gr_dflags= -gr_libs= -gr_srcs= -gr_hsrcs= -gr_hprog= - -magic_with_tcl="yes" -magic_with_tk="yes" -magic_with_tcl_includes="" -magic_with_tk_includes="" -magic_with_tcl_libraries="" -magic_with_tk_libraries="" - -dnl We will attempt to configure with Tcl/Tk and OpenGL. However, -dnl if checks for the appropriate header and library files fail, -dnl we will revert to non-Tcl and/or non-OpenGL compilation. -dnl Compilation for Tcl/Tk may be explicitly prohibited by using -dnl --with-tcl=no or --with-interpreter=no, and OpenGL may be -dnl disabled with --with-opengl=no - -usingOGL=1 -use_libglu="-lGLU" -usingTcl=1 -usingOA=0 - -dnl Check for gcore, used by niceabort.c - -AC_PATH_PROG(GCORE, gcore, [no]) - -dnl Check for /bin/csh; warn if not available. We should do something -dnl here to get makedbh to run under other common conditions, such as -dnl csh not being in /bin, or only tcsh being available. - -AC_PATH_PROG(CSH, csh, [no]) - -if test "x${CSH}" = "x"; then - AC_MSG_ERROR([cannot find /bin/csh---cannot compile!]) -fi - -dnl Check for X enabled/disabled - -AC_PATH_XTRA - -if test "x${X_DISPLAY_MISSING}" = "x"; then - usingX11=1 -else - AC_MSG_ERROR([Unable to find X11---compiling without graphics]) - echo Cannot find X11---will attempt to compile anyway. - echo Graphics options will be NULL only! - if test $usingOGL ; then - echo "Cannot use OpenGL/GLX without X11, disabling." - usingOGL= - fi - if test $usingTcl ; then - echo "Cannot compile TCL version without X11, disabling." - usingTcl= - fi -fi - -# Check for libXi, which is required on some systems but not available on -# others. -use_libxi="" -use_libxmu="" -use_libxext="" -AC_CHECK_LIB([Xi], [XOpenDevice], use_libxi="-lXi") -AC_CHECK_LIB([Xmu], [XmuInternAtom], use_libxmu="-lXmu") -AC_CHECK_LIB([Xext], [XextFindDisplay], use_libxext="-lXext") - -AC_ARG_WITH(interpreter, -[ --with-interpreter=[arg] enable interpreter (tcl, scheme, or no)], [ - if test "$withval" = "no" -o "$withval" = "NO"; then - usingTcl= - elif test "$withval" = "scheme" -o "$withval" = "SCHEME"; then - usingScheme=1 - usingTcl= - elif test "$withval" != "tcl" -a "$withval" != "TCL"; then - echo "Unknown option to --with-interpreter: Must be scheme, tcl, or no." - exit 1 - fi -], ) - -AC_ARG_WITH(tcl, -[ --with-tcl=DIR Find tclConfig.sh in DIR], [ - magic_with_tcl=$withval - if test "$withval" = "no" -o "$withval" = "NO"; then - usingTcl= - elif test $usingScheme ; then - echo Attempt to enable both Tcl and Scheme interpreters. - echo Disabling Tcl, and using Scheme instead. - usingTcl= - fi -], ) - -dnl ---------------------------------------------------------------- -dnl Do our best to find Tcl/Tk. If we can't, then flag a warning -dnl and don't set the usingTcl variable. -dnl -dnl This has been broken up into a number of sections, each of which -dnl depends independently on the setting of usingTcl. -dnl ---------------------------------------------------------------- - -AC_ARG_WITH(tk, [ --with-tk=DIR Find tkConfig.sh in DIR], - magic_with_tk=$withval) -AC_ARG_WITH(tclincls, [ --with-tclincls=DIR Find tcl.h in DIR], - magic_with_tcl_includes=$withval) -AC_ARG_WITH(tkincls, [ --with-tkincls=DIR Find tk.h in DIR], - magic_with_tk_includes=$withval) -AC_ARG_WITH(tcllibs, [ --with-tcllibs=DIR Find Tcl library in DIR], - magic_with_tcl_libraries=$withval) -AC_ARG_WITH(tklibs, [ --with-tklibs=DIR Find Tk library in DIR], - magic_with_tk_libraries=$withval) - -# ----------------------------------------------------------------------- -# Find the Tcl build configuration file "tclConfig.sh" -# ----------------------------------------------------------------------- - -if test $usingTcl ; then - TCL_INC_DIR="." - TK_INC_DIR="." - - AC_MSG_CHECKING([for tclConfig.sh]) - tcl_config_sh="" - - if test "$magic_with_tcl" = "no" ; then - magic_with_tcl="" - elif test "$magic_with_tcl" != "yes" ; then - # - # Verify that a tclConfig.sh file exists in the directory specified - # by --with-tcl. - # - for dir in \ - $magic_with_tcl - do - if test -r "$dir/tclConfig.sh" ; then - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - tcl_config_sh="$dir/lib/tclConfig.sh" - break - elif test -r "$dir/unix/tclConfig.sh" ; then - tcl_config_sh="$dir/unix/tclConfig.sh" - break - fi - done - else - # - # Otherwise, search for Tcl configuration file. - # - - # 1. Search previously named locations. - - for dir in \ - $prefix \ - $exec_prefix - do - if test -r "$dir/tclConfig.sh" ; then - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - tcl_config_sh="$dir/lib/tclConfig.sh" - break - elif test -r "$dir/unix/tclConfig.sh" ; then - tcl_config_sh="$dir/unix/tclConfig.sh" - break - fi - done - - # 2. Search standard locations. - # (1/25/05---/usr/lib added for Ubuntu Linux) - # (6/19/06---/usr/lib64 added for 64-bit architectures - - if test "x$tcl_config_sh" = "x" ; then - for dir in \ - `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - /usr/local/tcl \ - /usr/local/lib \ - /usr/lib64 \ - /usr/local \ - `ls -dr /usr/lib/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - /sw/lib \ - /usr - do - if test -r "$dir/tclConfig.sh" ; then - tcl_config_sh="$dir/tclConfig.sh" - break - elif test -r "$dir/lib/tclConfig.sh" ; then - tcl_config_sh="$dir/lib/tclConfig.sh" - break - fi - done - fi - fi - - AC_MSG_RESULT([${tcl_config_sh}]) - - if test "x$tcl_config_sh" = "x" ; then - echo "Can't find Tcl configuration script \"tclConfig.sh\"" - echo "Reverting to non-Tcl compilation" - usingTcl= - fi -fi - -# ----------------------------------------------------------------------- -# Find the Tk build configuration file "tkConfig.sh" -# ----------------------------------------------------------------------- - -if test $usingTcl ; then - - AC_MSG_CHECKING([for tkConfig.sh]) - tk_config_sh="" - if test "$magic_with_tk" != "yes"; then - # - # Verify that a tkConfig.sh file exists in the directory specified - # by --with-tcl or --with-tk. - # - for dir in \ - $magic_with_tk \ - $magic_with_tcl - do - if test -r "$dir/tkConfig.sh" ; then - tk_config_sh="$dir/tkConfig.sh" - break - elif test -r "$dir/lib/tkConfig.sh" ; then - tk_config_sh="$dir/lib/tkConfig.sh" - break - elif test -r "$dir/unix/tkConfig.sh" ; then - tk_config_sh="$dir/unix/tkConfig.sh" - break - fi - done - else - # - # Search for Tk configuration file. - # - - # - # 1. Search previously named locations. - # - for dir in \ - $prefix \ - $exec_prefix - do - if test -r "$dir/tkConfig.sh" ; then - tk_config_sh="$dir/tkConfig.sh" - break - elif test -r "$dir/lib/tkConfig.sh" ; then - tk_config_sh="$dir/lib/tkConfig.sh" - break - elif test -r "$dir/unix/tkConfig.sh" ; then - tk_config_sh="$dir/unix/tkConfig.sh" - break - fi - done - # - # 2. Search standard locations. - # - if test "x$tk_config_sh" = "x" ; then - for dir in \ - `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/local/tk/tk[[7-9]].[[0-9]]* 2>/dev/null` \ - /usr/local/tcl \ - /usr/local/lib \ - /usr/lib64 \ - /usr/local \ - `ls -dr /usr/lib/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ - `ls -dr /usr/lib/tk[[7-9]].[[0-9]]* 2>/dev/null` \ - /sw/lib \ - ${x_libraries} \ - /usr - do - if test -r "$dir/tkConfig.sh" ; then - tk_config_sh="$dir/tkConfig.sh" - break - elif test -r "$dir/lib/tkConfig.sh" ; then - tk_config_sh="$dir/lib/tkConfig.sh" - break - fi - done - fi - fi - AC_MSG_RESULT([${tk_config_sh}]) - - if test "x$tk_config_sh" = "x" ; then - echo "can't find Tk configuration script \"tkConfig.sh\"" - echo "Reverting to non-Tcl compilation" - usingTcl= - fi -fi - -# ----------------------------------------------------------------------- -# Source in the Tcl/Tk configuration scripts. -# ----------------------------------------------------------------------- - -if test $usingTcl ; then - . $tcl_config_sh - . $tk_config_sh - - if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then - : - elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then - : - elif test "$TCL_VERSION" = "$TK_VERSION" ; then - : - else - echo "Mismatched Tcl/Tk versions ($TCL_VERSION != $TK_VERSION)" - echo "Reverting to non-Tcl compile" - usingTcl= - fi -fi - -if test $usingTcl ; then - if test "x${magic_with_tcl_includes}" != "x" ; then - if test -r "${magic_with_tcl_includes}/tcl.h" ; then - TCL_INC_DIR=${magic_with_tcl_includes} - else - echo "Can't find tcl.h in \"${magic_with_tcl_includes}\"" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - else - for dir in \ - ${TCL_PREFIX}/include/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} \ - ${TCL_PREFIX}/include \ - ${TCL_SRC_DIR}/generic \ - ${TCL_INC_DIR} - do - if test -r "$dir/tcl.h" ; then - TCL_INC_DIR=$dir - break - fi - done - if test "x${TCL_INC_DIR}" = "x" ; then - echo "Can't find tcl.h header file" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - fi -fi - -if test $usingTcl ; then - if test "x${magic_with_tk_includes}" != "x" ; then - if test -r "${magic_with_tk_includes}/tk.h" ; then - TK_INC_DIR=${magic_with_tk_includes} - else - echo "Can't find tk.h in \"${magic_with_tk_includes}\"" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - else - for dir in \ - ${TK_PREFIX}/include/tk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION} \ - ${TK_PREFIX}/include \ - ${TK_SRC_DIR}/generic \ - ${TK_INC_DIR} \ - ${TCL_INC_DIR} - do - if test -r "$dir/tk.h" ; then - TK_INC_DIR=$dir - break - fi - done - if test "x${TK_INC_DIR}" = "x" ; then - echo "Can't find tk.h header file" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - fi -fi - -# FIXME -- why are we not using TCL_LIB_FILE FROM tclConfig.sh? -if test $usingTcl ; then - case $target in - *-sunos4*|*-*-netbsd*|NetBSD-*|FreeBSD-*|OpenBSD-*) - TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}" - TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}" - ;; - *) - TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}" - TK_LIB_NAME="tk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}" - ;; - esac - - loclib=`echo ${TCL_LIB_SPEC} | sed -e 's/.*-L//' -e 's/ .*//'` - - if test "x${TCL_LIB_SPEC}" = "x" ; then - TCL_LIB_SPEC="-l${TCL_LIB_NAME}" - fi - if test "x${TK_LIB_SPEC}" = "x" ; then - TK_LIB_SPEC="-l${TK_LIB_NAME}" - fi - -# Find the version of "wish" that corresponds to TCL_EXEC_PREFIX -# We really ought to run "ldd" to confirm that the linked libraries match. - - AC_MSG_CHECKING([for wish executable]) - for dir in \ - ${TK_EXEC_PREFIX}/bin \ - ${TK_EXEC_PREFIX} - do - for wishexe in \ - wish-X11 \ - wish \ - wish${TK_VERSION} \ - wish.exe \ - wish${TK_VERSION}.exe - do - if test -r "$dir/$wishexe" ; then - WISH_EXE=$dir/$wishexe - break - fi - done - if test "x${WISH_EXE}" != "x" ; then - break - fi - done - if test "x${WISH_EXE}" = "x" ; then - echo "Warning: Can't find executable for \"wish\". You may have to" - echo "manually set the value for WISH_EXE in the magic startup script." - AC_MSG_RESULT(no) - else - AC_MSG_RESULT([${WISH_EXE}]) - fi - -# Find the version of "tclsh" that corresponds to TCL_EXEC_PREFIX - - AC_MSG_CHECKING([for tclsh executable]) - for dir in \ - ${TK_EXEC_PREFIX}/bin \ - ${TK_EXEC_PREFIX} - do - for tclshexe in \ - tclsh \ - tclsh${TK_VERSION} \ - tclsh.exe \ - tclsh${TK_VERSION}.exe - do - if test -r "$dir/$tclshexe" ; then - TCLSH_EXE=$dir/$tclshexe - break - fi - done - if test "x${TCLSH_EXE}" != "x" ; then - break - fi - done - if test "x${TCLSH_EXE}" = "x" ; then - echo "Warning: Can't find executable for \"tclsh\"." - AC_MSG_RESULT(no) - else - AC_MSG_RESULT([${TCLSH_EXE}]) - fi - -# Have to define SHDLIB_EXT here even though we have to do it below, too. - case $target in - *-hpux*) - SHDLIB_EXT=".sl" - SHDLIB_EXT_ALT=".sl" - ;; - *cygwin*) - SHDLIB_EXT=".dll" - SHDLIB_EXT_ALT=".dll.a" - ;; - *darwin*) - SHDLIB_EXT=".dylib" - SHDLIB_EXT_ALT=".dylib" - ;; - *) - SHDLIB_EXT=".so" - SHDLIB_EXT_ALT=".so" - ;; - esac - - if test "x${magic_with_tcl_libraries}" != "x" ; then - for libname in \ - "${magic_with_tcl_libraries}/${TCL_LIB_FILE}" \ - "${magic_with_tcl_libraries}/lib${TCL_LIB_NAME}${SHDLIB_EXT}" \ - "${magic_with_tcl_libraries}/lib${TCL_LIB_NAME}${SHDLIB_EXT_ALT}" - do - if test -r "$libname" ; then - TCL_LIB_DIR="${magic_with_tcl_libraries}" - break - fi - done - - if test "x${TCL_LIB_DIR}" = "x" ; then - echo "Can't find tcl library in \"${magic_with_tcl_libraries}\"" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - else - for libname in \ - "${loclib:=${TCL_EXEC_PREFIX}/lib}/lib${TCL_LIB_NAME}${SHDLIB_EXT}" \ - "${loclib:=${TCL_EXEC_PREFIX}/lib}/lib${TCL_LIB_NAME}${SHDLIB_EXT_ALT}" - do - if test -r "$libname" ; then - TCL_LIB_DIR="${TCL_EXEC_PREFIX}/lib" - break - fi - done - if test "x${TCL_LIB_DIR}" = "x" ; then - echo "Can't find tcl library" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - fi -fi - -if test $usingTcl ; then - if test "x${magic_with_tk_libraries}" != "x" ; then - for libname in \ - "${magic_with_tk_libraries}/${TCL_LIB_FILE}" \ - "${magic_with_tk_libraries}/lib${TK_LIB_NAME}${SHDLIB_EXT}" \ - "${magic_with_tk_libraries}/lib${TK_LIB_NAME}${SHDLIB_EXT_ALT}" - do - if test -r "$libname" ; then - TK_LIB_DIR="${magic_with_tk_libraries}" - break - fi - done - if test "x${TK_LIB_DIR}" = "x" ; then - echo "Can't find tk library in \"${magic_with_tk_libraries}\"" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - else - for libname in \ - "${loclib:=${TK_EXEC_PREFIX}/lib}/lib${TK_LIB_NAME}${SHDLIB_EXT}" \ - "${loclib:=${TK_EXEC_PREFIX}/lib}/lib${TK_LIB_NAME}${SHDLIB_EXT_ALT}" - do - if test -r "$libname" ; then - TK_LIB_DIR="${TK_EXEC_PREFIX}/lib" - break - fi - done - if test "x${TK_LIB_DIR}" = "x" ; then - echo "Can't find tk library" - echo "Reverting to non-Tcl compile" - usingTcl= - fi - fi -fi - -dnl ---------------------------------------------------- -dnl End of Tcl/Tk search -dnl ---------------------------------------------------- - -dnl OpenAccess database support. -dnl There should be some checks here to confirm that the libraries -dnl are there, and usable. - -dnl There is no default search path here. Is there a default -dnl installation location for the OpenAccess libraries and include -dnl files? - -AC_ARG_WITH(openaccess, -[ --with-openaccess=DIR use OpenAccess libraries in DIR], [ - if test "$withval" = "no" -o "$withval" = "NO" ; then - OA= - OA_LIBS= - unused="$unused oa" - elif test "$withval" = "yes"; then - AC_MSG_ERROR([path to OpenAccess libraries is required]) - OA= - OA_LIBS= - unused="$unused oa" - else - usingOA=1 - OA=${withval} - OA_LIBS="-L\${OA}/lib -loaDB -loaDD -loaTC -loaBase" - OA_LIBS="${OA_LIBS} -lclalite_sh -lcls_sh -lcdsCommon_sh" - AC_DEFINE(OPENACCESS) - LD_RUN_PATH="-Wl,-rpath=\${OA}/lib" - modules="$modules oa" - extra_libs="$extra_libs \${MAGICDIR}/oa/liboa.o" - fi -]) - -AC_ARG_ENABLE(memdebug, -[ --enable-memdebug enable memory debugging], -[], -[enable_memdebug=no]) - -if test "x$enable_memdebug" = "xyes" ; then - if test "x$magic_with_tcl" = "x" ; then - LIBS="${LIBS} -lefence" - else - AC_DEFINE(TCL_MEM_DEBUG) - fi -fi - -AC_ARG_ENABLE(modular, -[ --enable-modular embed ext2sim and ext2spice packages], -[], -[enable_modular=no]) - -if test $usingTcl ; then - if test "x$enable_modular" = "xyes" ; then - programs="$programs ext2sim ext2spice" - AC_DEFINE(EXT2SPICE_AUTO) - AC_DEFINE(EXT2SIM_AUTO) - else - modules="$modules ext2sim ext2spice" - extra_libs="$extra_libs \${MAGICDIR}/ext2sim/libext2sim.o" - extra_libs="$extra_libs \${MAGICDIR}/ext2spice/libext2spice.o" - fi -else - programs="$programs ext2sim ext2spice" - AC_DEFINE(EXT2SPICE_AUTO) - AC_DEFINE(EXT2SIM_AUTO) -fi - -AC_ARG_ENABLE(locking, -[ --disable-locking disable file locking], -[], -[enable_locking=yes]) - -if test "x$enable_locking" = "xyes" ; then - case $target in - *cygwin*) - ;; - *) - AC_DEFINE(FILE_LOCKS) - ;; - esac -fi - -AC_ARG_ENABLE(calma, -[ --disable-calma disable calma package], -[], -[enable_calma=yes]) - -if test "x$enable_calma" = "xyes" ; then - AC_DEFINE(CALMA_MODULE) - modules="$modules calma" - extra_libs="$extra_libs \${MAGICDIR}/calma/libcalma.o" -else - unused="$unused calma" -fi - -AC_ARG_ENABLE(cif, -[ --disable-cif disable cif package], -[], -[enable_cif=yes]) - -if test "x$enable_cif" = "xyes" ; then - AC_DEFINE(CIF_MODULE) - modules="$modules cif" - extra_libs="$extra_libs \${MAGICDIR}/cif/libcif.o" -else - unused="$unused cif" -fi - -AC_ARG_ENABLE(client-render, -[ --disable-client-render disable OpenGL client-side rendering], -[], -[enable_client_render=yes]) - -if test "x$enable_client_render" = "xno" ; then - AC_DEFINE(OGL_SERVER_SIDE_ONLY) -fi - -AC_ARG_ENABLE(invert-y, -[ --enable-invert-y invert screen top to bottom in OpenGL], -[], -[enable_invert_y=no]) - -if test "x$enable_invert_y" = "xyes" ; then - AC_DEFINE(OGL_INVERT_Y) -fi - -AC_ARG_ENABLE(framebuffer-backing-store, -[ --enable-framebuffer-backing-store enable OpenGL framebuffer backing store], -[], -[enable_framebuffer_backing_store=no]) - -if test "x$enable_framebuffer_backing_store" != "xyes" ; then - AC_DEFINE(X11_BACKING_STORE) -fi - -AC_ARG_ENABLE(plot, -[ --disable-plot disable plot package], -[], -[enable_plot=yes]) - -if test "x$enable_plot" = "xyes" ; then - AC_DEFINE(PLOT_MODULE) - modules="$modules plot" - extra_libs="$extra_libs \${MAGICDIR}/plot/libplot.o" -else - unused="$unused plot" -fi - -AC_ARG_ENABLE(lef, -[ --disable-lef disable LEF package], -[], -[enable_lef=yes]) - -if test "x$enable_lef" = "xyes" ; then - AC_DEFINE(LEF_MODULE) - modules="$modules lef" - extra_libs="$extra_libs \${MAGICDIR}/lef/liblef.o \${MAGICDIR}/extflat/libextflat.o" -else - unused="$unused lef" -fi - -AC_ARG_ENABLE(readline, -[ --disable-readline disable readline package], -[ if test $usingTcl ; then - enable_readline=no - fi -], -[ if test $usingTcl ; then - enable_readline=no - else - enable_readline=yes - fi -]) - -if test "x$enable_readline" = "xyes" ; then - AC_DEFINE(USE_READLINE) - use_system_readline=yes - AC_CHECK_LIB(readline, rl_pre_input_hook,, - use_system_readline=no) - AC_CHECK_LIB(readline, rl_username_completion_function,, - use_system_readline=no) - AC_CHECK_LIB(readline, rl_filename_completion_function,, - use_system_readline=no) - AC_CHECK_LIB(readline, rl_attempted_completion_over,, - use_system_readline=no) - if test $use_system_readline = yes ; then - AC_DEFINE(HAVE_READLINE) - rl_libs="-lreadline" - else - rl_libs="\${MAGICDIR}/readline/readline/libreadline.a" - CPPFLAGS="$CPPFLAGS -I\${MAGICDIR}/readline" - fi - AC_CHECK_LIB(termcap, tgetent, [ - rl_libs="$rl_libs -ltermcap" - ], [ - AC_CHECK_LIB(ncurses, tgetent, [ - rl_libs="$rl_libs -lncurses" - ], ) - ], ) - modules="$modules readline" -else - unused="$unused readline" -fi - -AC_ARG_ENABLE(threads, -[ --disable-threads disable threaded graphics], -[ if test $usingTcl ; then - enable_threads=no - fi -], -[ if test $usingTcl ; then - enable_threads=no - else - enable_threads=yes - fi -]) - -if test "x$enable_threads" = "xyes" ; then - usingThreads=1 - AC_DEFINE(HAVE_PTHREADS) - gr_libs="$gr_libs -lpthread" - gr_srcs="$gr_srcs \${X11THREAD_SRCS}" - gr_hsrcs="" - gr_hprog="" -fi - -AC_ARG_ENABLE(route, -[ --disable-route disable routing package], -[], -[enable_route=yes]) - -if test "x$enable_route" = "xyes" ; then - AC_DEFINE(ROUTE_MODULE) - modules="$modules garouter grouter irouter mzrouter router gcr" - programs="$programs net2ir" - extra_libs="$extra_libs \${MAGICDIR}/garouter/libgarouter.o \ - \${MAGICDIR}/mzrouter/libmzrouter.o \${MAGICDIR}/router/librouter.o \ - \${MAGICDIR}/irouter/libirouter.o \${MAGICDIR}/grouter/libgrouter.o \ - \${MAGICDIR}/gcr/libgcr.o" -else - unused="$unused garouter grouter irouter mzrouter router gcr" -fi - -AC_ARG_ENABLE(rsim, -[ --disable-rsim disable IRSIM tool], -[ if test $usingTcl ; then - enable_rsim=no - fi -], -[ if test $usingTcl ; then - enable_rsim=no - else - enable_rsim=yes - fi -]) - -if test "x$enable_rsim" = "xyes" ; then - AC_DEFINE(RSIM_MODULE) -fi - -AC_ARG_ENABLE(new-macros, -[ --disable-new-macros disable new macro set], -[], -[enable_new_macros=yes]) - -if test "x$enable_new_macros" = "xyes" ; then - AC_DEFINE(USE_NEW_MACROS) -fi - -AC_ARG_WITH(opengl, -[ --with-opengl=DIR use OpenGL include files in DIR], [ - if test "$withval" = "no" -o "$withval" = "NO" ; then - usingOGL= - elif test "$withval" != "no" -a "$withval" != "yes"; then - OGL_INCLUDE_DIR=${withval} - fi -]) - -dnl ---------------------------------------------------------------- -dnl Check for OpenGL headers and libraries, if OpenGL was specified. -dnl If they cannot be found, then disable OpenGL and flag a warning. -dnl ---------------------------------------------------------------- - -if test $usingOGL ; then - ac_save_CPPFLAGS="$CPPFLAGS" - if test $OGL_INCLUDE_DIR ; then - CPPFLAGS="$CPPFLAGS -I$OGL_INCLUDE_DIR" - fi - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AC_CHECK_HEADER(GL/gl.h, , [ - echo "GL header files not found, disabling OpenGL" - usingOGL= - ],) - CPPFLAGS="$ac_save_CPPFLAGS" -fi - -if test $usingOGL ; then - ac_save_CPPFLAGS="$CPPFLAGS" - ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS -lm" - AC_CHECK_LIB(GL, glXCreateContext, , [ - echo "GL library files not found, disabling OpenGL" - usingOGL= - ],) - AC_CHECK_LIB(GLU, gluNewTess, , [ - echo "GLU library files not found; disabling font rendering" - use_libglu="" - ],) - CPPFLAGS="$ac_save_CPPFLAGS" - LDFLAGS="$ac_save_LDFLAGS" -fi - -if test "x$use_libglu" != "x" ; then - AC_DEFINE(VECTOR_FONTS) -fi - -if test $usingOGL ; then - if test $OGL_INCLUDE_DIR ; then - gr_cflags="${gr_cflags} -I${OGL_INCLUDE_DIR}" - fi -fi - -dnl ---------------------------------------------------------------- -dnl Once we're sure what, if any, interpreter is being compiled, -dnl set all the appropriate definitions. For Tcl/Tk, override -dnl the default install targets: allows compiling tcl version with -dnl "make" instead of requiring "make tcl" -dnl ---------------------------------------------------------------- - -if test $usingTcl ; then - cadinstall="$cadinstall graphics tcltk" - modules="$modules tcltk" - unused="$unused lisp" - programs="$programs tcltk" - ALL_TARGET="tcl" - INSTALL_TARGET="install-tcl" - AC_DEFINE(MAGIC_WRAPPER) - extra_libs="$extra_libs \${MAGICDIR}/tcltk/libtcltk.o" - extra_defs="$extra_defs -DTCL_DIR=\\\"\${TCLDIR}\\\"" -elif test $usingScheme ; then - modules="$modules lisp" - unused="$unused tcltk" - cadinstall="$cadinstall lisp" - extra_libs="$extra_libs \${MAGICDIR}/lisp/liblisp.o" - programs="$programs extcheck graphics" - AC_DEFINE(SCHEME_INTERPRETER) -else - unused="$unused lisp tcltk" - programs="$programs extcheck graphics" -fi - -dnl ---------------------------------------------------------------- -dnl Handle graphics based on the setting of "usingTcl", "usingX11", -dnl and "usingOGL" -dnl ---------------------------------------------------------------- - -if test $usingTcl ; then - if test $usingX11 ; then - gr_dflags="$gr_dflags -DX11 -DXLIB" - gr_libs="$gr_libs -lX11" - gr_srcs="$gr_srcs \${TK_SRCS}" - fi - if test $usingOGL ; then - AC_DEFINE(THREE_D) - gr_dflags="$gr_dflags -DOGL" - gr_libs="$gr_libs -lGL ${use_libglu} ${use_libxi} ${use_libxmu} ${use_libxext} -lm" - gr_srcs="$gr_srcs \${TOGL_SRCS}" - if ! test $usingX11 ; then - usingX11=1 - gr_dflags="$gr_dflags -DXLIB" - gr_libs="$gr_libs -lX11" - fi - fi - gr_srcs="$gr_srcs \${TKCOMMON_SRCS}" -else - if test $usingX11 ; then - gr_dflags="$gr_dflags -DX11 -DXLIB" - gr_libs="$gr_libs -lX11" - gr_srcs="$gr_srcs \${X11_SRCS}" - fi - if test $usingOGL ; then - gr_dflags="$gr_dflags -DOGL" - gr_libs="$gr_libs -lGL ${use_libglu} ${use_libxi} ${use_libxmu} ${use_libxext} -lm" - gr_srcs="$gr_srcs \${OGL_SRCS}" - if ! test $usingX11 ; then - usingX11=1 - gr_libs="$gr_libs -lX11" - gr_dflags="$gr_dflags -DXLIB" - fi - fi - if test $usingX11 ; then - if ! test $usingThreads; then - gr_dflags="$gr_dflags -DX11HELP_PROG=\\\"\${X11HELP_PROG}\\\"" - gr_hsrcs="$gr_hsrcs \${X11HELPER_SRCS}" - gr_hprog="$gr_hprog \${X11HELP_PROG}" - fi - fi -fi - -dnl ---------------------------------------------------------------- -dnl Define system-specific settings -dnl ---------------------------------------------------------------- - -case $target in - *-linux*) - AC_DEFINE(linux) - AC_DEFINE(SYSV) - dnl Defining "ISC" prevents compiler failure on redefinition of "wchar_t" - AC_DEFINE(ISC) - dnl 64-bit support for AMD Opteron - case $target in - *x86_64*) - CFLAGS="${CFLAGS} -m64 -fPIC" - ;; - esac - if test $usingOGL ; then - gr_libs="$gr_libs -lstdc++" - fi - if test -f /usr/lib/libbsd-compat.a ; then - gr_libs="$gr_libs -lbsd-compat" - elif test -f /usr/lib/libbsd.a ; then - gr_libs="$gr_libs -lbsd" - fi - ;; - *solaris*) - AC_DEFINE(SYSV) - ;; - *irix*) - AC_DEFINE(SYSV) - AC_DEFINE(IRIX) - AC_DEFINE(_BSD_SIGNALS) - ;; - *sysv*) - AC_DEFINE(SYSV) - ;; - *cygwin*) - AC_DEFINE(CYGWIN) - AC_DEFINE(i386) - ;; - *darwin*) - if test "$CPP" = "cc -E" ; then - CPPFLAGS="$CPPFLAGS -no-cpp-precomp" - fi - ;; -esac - -# ----------------------------------------------------------------------- -# Tcl/Tk configuration -# ----------------------------------------------------------------------- - -if test $usingTcl ; then - -# ----------------------------------------------------------------------- -# -# Tk libraries and header files -# -# ----------------------------------------------------------------------- - if test "${TK_INC_DIR}" != "/usr/include" ; then - INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}" - fi - if test "${TK_LIB_DIR}" = "/usr/lib" -o \ - "${TK_LIB_DIR}" = "/usr/lib64" ; then - LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}" - else - LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}" - if test "x${loader_run_path}" = "x" ; then - loader_run_path="${TK_LIB_DIR}" - else - loader_run_path="${TK_LIB_DIR}:${loader_run_path}" - fi - fi - -# ----------------------------------------------------------------------- -# -# Tcl libraries and header files -# -# Add a header file directory specification only if the Tcl headers reside -# in a different directory from Tk's. -# -# -# ----------------------------------------------------------------------- - if test "${TCL_INC_DIR}" != "/usr/include" -a \ - "${TCL_INC_DIR}" != "${TK_INC_DIR}" ; then - INC_SPECS="${INC_SPECS} -I${TCL_INC_DIR}" - fi - - if test "${TCL_LIB_DIR}" = "/usr/lib" -o \ - "${TCL_LIB_DIR}" = "/usr/lib64" -o \ - "${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then - LIB_SPECS="${LIB_SPECS} ${TCL_LIB_SPEC}" - else - LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}" - if test "x${loader_run_path}" = "x" ; then - loader_run_path="${TCL_LIB_DIR}" - else - loader_run_path="${TCL_LIB_DIR}:${loader_run_path}" - fi - fi - -#-------------------------------------------------------------------- -# -# Check if we can generate shared libraries on this system. Set flags -# to generate shared libraries for systems that we know about. Start -# with the values found in tclConfig.sh, make changes as we know about -# the different systems. -# -#-------------------------------------------------------------------- - -# Initialize shared library build variables - - SHLIB_LD="" - LDDL_FLAGS="-shared" - SHDLIB_EXT=".so" - EXTRA_LIB_SPECS="" - - build_shared="yes" - - case $target in - *-aix4.[[2-9]]*) - # No Position-Independent flags needed - - # Use the installed export file or the one found in the source directory. - - if test -r "${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" ; then - tcl_exp="${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" - else - tcl_exp="${TCL_SRC_DIR}/unix/lib.exp" - fi - if test -r "${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" ; then - tk_exp="${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" - else - tk_exp="${TK_SRC_DIR}/unix/lib.exp" - fi - - full_src_path=`cd ${srcdir}; pwd` - - # Use shell-script to link shared library - LD="${full_src_path}/cf/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}" - - SHLIB_LIB_SPECS="${aix_lib_specs} -lc" - - LDFLAGS="-L${loader_run_path}" - EXTRA_LIB_SPECS="-ldl" - ;; - - *-aix*) - # No Position-Independent flags needed - - # Use the installed export file or the one found in the source directory. - - if test -r "${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" ; then - tcl_exp="${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" - else - tcl_exp="${TCL_SRC_DIR}/unix/lib.exp" - fi - if test -r "${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" ; then - tk_exp="${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" - else - tk_exp="${TK_SRC_DIR}/unix/lib.exp" - fi - - full_src_path=`cd ${srcdir}/cf; pwd` - - # Use shell-script to link shared library - - LD="${full_src_path}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}" - SHLIB_LIB_SPECS="${aix_lib_specs} -lc" - LDFLAGS="-L${loader_run_path}" - EXTRA_LIB_SPECS="-lld" - ;; - - *-bsdi2*|*-bsdi3*) - LD="shlicc" - LDDL_FLAGS="-r" - EXTRA_LIB_SPECS="-ldl" - ;; - - *darwin*) - SHDLIB_EXT=".dylib" - LDDL_FLAGS="-dynamiclib -flat_namespace -undefined suppress -noprebind" - LDFLAGS="${LDFLAGS} ${LIB_SPECS}" - CFLAGS="${CFLAGS} ${X_CFLAGS} ${INC_SPECS} -I/sw/include -fno-common" - ;; - - *cygwin*) - SHDLIB_EXT=".dll" - AC_DEFINE(USE_DL_IMPORT) - LDDL_FLAGS='-shared -Wl,--enable-auto-image-base' - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - ld_extra_libs=${LIB_SPECS} - sub_extra_libs='-L${MAGICDIR}/magic -ltclmagic' - ;; - - *-bsdi4*) - SHLIB_CFLAGS="-export-dynamic -fPIC" - LDDL_FLAGS='-shared -Wl,-E -Wl,-soname,$@' - ;; - - *-dgux*) - SHLIB_CFLAGS="-K PIC" - LDDL_FLAGS="-G" - EXTRA_LIB_SPECS="-ldl" - ;; - - *-hpux*) - if test "$GCC" = "no" ; then - AC_DEFINE(_HPUX_SOURCE) - fi - AC_CHECK_LIB(dld, shl_load, [found=yes], [found=no]) - if test "${found}" = "yes" ; then - SHLIB_CFLAGS="+z" - LDDL_FLAGS="-b -E -n +s +b,${loader_run_path}:." - SHDLIB_EXT=".sl" - - # The run path is included in both LDFLAGS and LDDL_FLAGS - # because SHLIB_LD is ld and LD is cc/gcc. - - LDFLAGS="-Wl,-E -Wl,+s,+b,${loader_run_path}:." - EXTRA_LIB_SPECS="-ldld" - fi - ;; - - *-irix64-6.5*) - LDDL_FLAGS="-32 -shared -rdata_shared" - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - ;; - - *-irix-[56].*|*-irix64-*) - LDDL_FLAGS="-shared -rdata_shared" - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - LDFLAGS="" - if test "$GCC" = "yes" ; then - SHLIB_CFLAGS="-mabi=n32 $SHLIB_CFLAGS" - LDDL_FLAGS="-mabi=n32 $LDDL_FLAGS" - LDFLAGS="-mabi=n32 $LDFLAGS" - else - CFLAGS="-n32 $CFLAGS" - LDFLAGS="-n32 $LDFLAGS" - fi - ;; - - *-linux*) - LDDL_FLAGS='-shared -Wl,-soname,$@' - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - LDFLAGS="" - EXTRA_LIB_SPECS="-ldl" - ;; - - *-mp-ras-02*) - SHLIB_CFLAGS="-G -K PIC" - LDDL_FLAGS="" - ;; - - *-mp-ras-*) - SHLIB_CFLAGS="-G -K PIC" - LDDL_FLAGS="-Wl,-Bexport" - ;; - - *-ncr-sysv4-*2*) - SHLIB_CFLAGS="-K PIC" - LDDL_FLAGS="-G" - - EXTRA_LIB_SPECS="-ldl" - ;; - - *-ncr-sysv4*) - SHLIB_CFLAGS="-K PIC" - LDDL_FLAGS="-G -Wl,-Bexport" - - LDFLAGS="-Wl,-Bexport" - EXTRA_LIB_SPECS="-ldl" - ;; - - *-freebsd*) - # Not available on all versions: check for include file. - SHLIB_CFLAGS="-fpic" - LDDL_FLAGS="-shared ${LIB_SPECS}" - CFLAGS="${CFLAGS} -l/usr/X11R6/include" - ;; - - *-netbsd*|*-openbsd*) - # Not available on all versions: check for include file. - AC_CHECK_HEADER(dlfcn.h, test_ok=yes, test_ok=no) - if test "$test_ok" = yes; then - SHLIB_CFLAGS="-fPIC" - LDDL_FLAGS="-shared ${LIB_SPEC}" - fi - ;; - - *-nextstep*) - LDDL_FLAGS="-nostdlib -r" - ;; - - *-osf1-1.[012]*) - # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 - - # Warning: Ugly Makefile Hack - # Make package name same as library name - - SHLIB_LD='ld -R -export $@:' - ;; - - *-osf1-1.*) - # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 - - SHLIB_CFLAGS="-fpic" - SHLIB_LD="ld -shared" - ;; - - *-osf1V*) - # Digital OSF/1 - - LDDL_FLAGS='-shared -expect_unresolved "*"' - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - LDFLAGS="" - ;; - - *-sco*) - # 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. - - SHLIB_CFLAGS="-Kpic -belf" - LDDL_FLAGS="-G" - LDFLAGS="-belf -Wl,-Bexport" - ;; - - *-sni-sysv*) - - SHLIB_CFLAGS="-K PIC" - LDDL_FLAGS="-G" - - EXTRA_LIB_SPECS="-ldl" - ;; - - *-sunos4*) - - SHLIB_CFLAGS="-PIC" - LDDL_FLAGS="-assert pure-text" - - EXTRA_LIB_SPECS="-ldl" - ;; - - *-solaris2*) - - if test "$with_gnu_ld" = "yes" ; then - LDDL_FLAGS='-shared -Wl,-E -Wl,-soname,$@ ${LIB_SPEC}' - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -Wl,-rpath,${loader_run_path}" - fi - else - LDDL_FLAGS="-shared -mimpure-text" - if test "x${loader_run_path}" != "x" ; then - LD_RUN_PATH="${LD_RUN_PATH} -R ${loader_run_path}" - fi - fi - EXTRA_LIB_SPECS="-ldl" - ;; - - *-mips-dde-sysv*) - - SHLIB_CFLAGS="-KPIC" - LDDL_FLAGS="-G" - - EXTRA_LIB_SPECS="-ldl" - ;; - - *-pc-sysv4* | *-unixware-5*) - SHLIB_CFLAGS="-G -KPIC" - LDDL_FLAGS=" -Wl,-Bexport" - ;; - - esac - -# If we're running gcc, then set SHLIB_CFLAGS flags for compiling -# shared libraries for gcc, instead of those of the vendor's compiler. - - if test "$GCC" = "yes" ; then - case $target in - *cygwin*) - ;; - *) - SHLIB_CFLAGS="-Wimplicit-int -fPIC" - ;; - esac - fi - if test "$with_gnu_ld" = "yes" ; then - LDDL_FLAGS="${LDDL_FLAGS} -Wl,--version-script=\${MAGICDIR}/magic/symbol.map" - fi - - AC_SUBST(SHDLIB_EXT) - AC_SUBST(SHLIB_LD) - AC_SUBST(LD) - AC_SUBST(LDDL_FLAGS) - AC_SUBST(SHLIB_LIB_SPECS) - - AC_SUBST(EXTRA_LIB_SPECS) - AC_SUBST(LDFLAGS) - AC_SUBST(INC_SPECS) - AC_SUBST(LIB_SPECS) - AC_SUBST(WISH_EXE) - AC_SUBST(TCLSH_EXE) - AC_SUBST(TCL_LIB_DIR) - -fi - -if test "$GCC" = "yes" ; then - DEPEND_FLAG="-MM" -fi - - -dnl Substitute all variables - -AC_SUBST(gr_libs) -AC_SUBST(PACKAGE) -AC_SUBST(SCRIPTS) -AC_SUBST(extra_libs) -AC_SUBST(extra_defs) -AC_SUBST(ld_extra_libs) -AC_SUBST(ld_extra_objs) -AC_SUBST(top_extra_libs) -AC_SUBST(sub_extra_libs) -AC_SUBST(modules) -AC_SUBST(unused) -AC_SUBST(programs) -AC_SUBST(cadinstall) - -AC_SUBST(rl_defs) -AC_SUBST(rl_libs) - -AC_SUBST(gr_cflags) -AC_SUBST(gr_dflags) -AC_SUBST(gr_libs) -AC_SUBST(gr_srcs) -AC_SUBST(gr_hsrcs) -AC_SUBST(gr_hprog) - -AC_SUBST(X_LIBS) -AC_SUBST(X_CFLAGS) -AC_SUBST(CPPFLAGS) -AC_SUBST(CFLAGS) -AC_SUBST(DEPEND_FLAG) -AC_SUBST(SHLIB_CFLAGS) -AC_SUBST(LD_RUN_PATH) - -AC_SUBST(MAGIC_VERSION) -AC_SUBST(MAGIC_REVISION) - -AC_SUBST(OA) -AC_SUBST(OA_LIBS) - -AC_SUBST(ALL_TARGET) -AC_SUBST(INSTALL_TARGET) - -AC_OUTPUT(defs.mak) - -dnl -dnl Print configuration and report problems - -ECHO_N=printf - -echo -echo "-----------------------------------------------------------" -echo "Configuration Summary (principle requirements):" -echo - -${ECHO_N} "X11: " -if test $usingX11 ; then - echo "yes" -else - echo "no" - echo - echo " Magic requires X11 for all graphics operations. Without it," - echo " magic can only be run in batch mode using option '-dnull'." - echo " Generally, not finding X11 means that paths to header files" - echo " and/or libraries are missing or in an unexpected place. Try" - echo " using configure options --x-includes= and --x-libraries=." - echo -fi - -${ECHO_N} "OpenGL: " -if test $usingOGL ; then - echo "yes" - ${ECHO_N} "Vector fonts: " - if test "x$use_libglu" != "x" ; then - echo "yes" - else - echo "no" - fi -else - echo "no" - echo - echo " OpenGL graphics are considerably better than the standard 8-bit" - echo " and 24-bit X11 graphics, provided that you have a video card and" - echo " driver supporting accelerated OpenGL graphics. If you get this" - echo " message, you may need to download OpenGL libraries and header" - echo " files, which are usually available from the video card manufacturer." - echo " Magic with un-accelerated OpenGL, such as using Mesa GL without" - echo " a supported graphics card, is usually a very bad combination." - echo -fi - -if test $usingTcl ; then - ${ECHO_N} "Tcl/Tk: " - echo "yes" -else - if test $usingScheme ; then - ${ECHO_N} "Scheme: " - echo "yes" - else - ${ECHO_N} "Tcl/Tk: " - echo "no" - echo - echo " Without Tcl/Tk, you cannot run the enhanced version of magic" - echo " with the toolbar and menus, and a number of other functions" - echo " are disabled. If you did not specifically disable Tcl/Tk on" - echo " the configure command line, then getting this message means" - echo " that you do not have Tcl/Tk headers and or libraries installed," - echo " or they are not in a standard path. Try using configure options" - echo " --with-tcl= and --with-tk=." - echo - fi -fi - -echo "-----------------------------------------------------------" -echo - -echo "Use 'make' to compile and 'make install' to install." -echo -echo "Errors may not be printed to stdout: see files 'make.log' " -echo " and 'install.log' for complete error summary." -echo -echo "-----------------------------------------------------------" -echo - -dnl Put "defs.mak" in the top-level directory -cp defs.mak .. diff --git a/scripts/defs.mak b/scripts/defs.mak index e50e8a66..d94efcf2 100644 --- a/scripts/defs.mak +++ b/scripts/defs.mak @@ -62,16 +62,16 @@ LIB_SPECS_NOSTUB = -L/usr/lib64 -ltk8.6 -L/usr/lib64 -ltcl8.6 WISH_EXE = /usr/bin/wish TCL_LIB_DIR = /usr/lib MAGIC_VERSION = 8.2 -MAGIC_REVISION = 34 +MAGIC_REVISION = 36 CC = gcc CPP = gcc -E CXX = g++ CPPFLAGS = -I. -I${MAGICDIR} -DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DUSE_TCL_STUBS -DUSE_TK_STUBS -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"34\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" +DFLAGS = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DUSE_TCL_STUBS -DUSE_TK_STUBS -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"36\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" DFLAGS += -DSHDLIB_EXT=\".so\" -DNDEBUG -DFLAGS_NOSTUB = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"34\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" +DFLAGS_NOSTUB = -DCAD_DIR=\"${LIBDIR}\" -DBIN_DIR=\"${BINDIR}\" -DTCL_DIR=\"${TCLDIR}\" -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DMAGIC_VERSION=\"8.2\" -DMAGIC_REVISION=\"36\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSIZEOF_VOID_P=8 -DSIZEOF_UNSIGNED_INT=4 -DSIZEOF_UNSIGNED_LONG=8 -DSIZEOF_UNSIGNED_LONG_LONG=8 -DSTDC_HEADERS=1 -DHAVE_SETENV=1 -DHAVE_PUTENV=1 -DHAVE_SYS_MMAN_H=1 -DHAVE_DIRENT_H=1 -DHAVE_LIMITS_H=1 -DHAVE_PATHS_H=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DFILE_LOCKS=1 -DCALMA_MODULE=1 -DCIF_MODULE=1 -DPLOT_MODULE=1 -DLEF_MODULE=1 -DROUTE_MODULE=1 -DUSE_NEW_MACROS=1 -DHAVE_LIBGL=1 -DHAVE_LIBGLU=1 -DVECTOR_FONTS=1 -DHAVE_LIBCAIRO=1 -DMAGIC_WRAPPER=1 -DTHREE_D=1 -Dlinux=1 -DSYSV=1 -DISC=1 -DGCORE=\"/bin/gcore\" DFLAGS_NOSTUB += -DSHDLIB_EXT=\".so\" -DNDEBUG CFLAGS = -g -m64 -fPIC -Wimplicit-int -fPIC diff --git a/tiles/.search2.c.swp b/tiles/.search2.c.swp deleted file mode 100644 index b7b1449274f4ee2dc81e124575d820ace3f4beaf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHOUx*|}883}`j^K@cB=pb3hPK7@!qs0b=P1pISgM8)7k5JLQY)!lP5>lz_h z2}1SWZ+fPy>Z|Yj)mPtFUEO!k_*na+^ugMF0>?Xq_~L~pZhY>Z_lUDSA&eUH)&F`V zCYDnbB{yd;U-dH(SRX2r#9nQpfMdWh;23ZWI0hU8jseHO{~rTpa+i1%YQH{LeUzVH zcjWw1eoXW0>PY!r`R}{)^Rq|F^PleI7;p?Y1{?#90mp!2z%k$$a11yG90QI4$G~gA zfb@lU7yA7<-|*x4e{ui+;@gGz3-BE9E8v&FXMu~rb8i#kYrr-jfbX6b!Ux_BJcA8@ zhk-+23Mk;&w+iuN;2Gd4;7Q9e5o0Jn$IsAW#DS zSQ6rQz;A)4f$srd1-=Y?3HSo=5#R&BdEogs3-JTsDd5|{5ZD8{z$Q=voqfQSvnK zB=8+z3|s8t$WRcaD&w<1{N{Gyd`4HZ}dSC^AXI3o$gr8gpe zIizUU4Ln1Y7@r&5YaB?fpS?K3bxNhu{6uCHP$&~>#r4wJW5OjJF{ex!lf^NhZlseB}yl?{zvgYyGYj zSFuv9@!17*b~sYG#R-As8bKd)%RMKy+hq$6l^Ky0Q>fn_z`Cpj_gCe1*4{fdB`N4t zfxj^RT*zu#Wvsp+Ki7pV9YVE?T-rJ6Ox2hf?VP?ij>zJflS8^Ng*tT%|dZ(GWgoNJp3q zcBI*%Q#00ZX-}r?wN=tF&2;+yFf1*%w|?Vk_$9odz1{4#uC}*2H!zG5=7E~RD>RL@ zuLjDq6X47d0mmwi=|vB1cDLKxALjDqE{|!!6<+mG@b;<&u>c6ezmlipD2ORB%6Ox| z1}UEK3CR%d?9YmDfeBkFvA@f~fMbu0W|&{mkmP|*vmlY!`A~!xjX{br<77k=oh0fY zoUw>(GL0m7FM2o#f~e?bDJm5+?EoEM{KsixSOiBV#2PQ~(>Qga&b72h&I3 zEVM(jLzOHV1_`vi({EkI7nW8;fjc6tsSk}1-{6~+a7YWR(FrDVl79GyYxyz8| zXcMsL-a_@F3q%U&0it4rOe?*?`o@7tK|XZ1t&8aG>G32CIJibS9>cmBqTkwL1Ma75 zHA(U==;~H4-jxU~HVBoeeT{DH?7>C1`_$i|UTd@4yiV74y0p95=4*`*&MfkC^)!XT``YmdGyxH3A+gAPSE$Z!UHCvqy?RGY|ThM8**Mb0+aj3!& z(Q(m4;ygCDfRd3;Lq9i}8fc9G4N@`=64(d+vV@e4dM3H_2+k#B+Y06z(L%!Ykbfi+ zb5>wOb%h<*UgBuG%D<{)>y^14$K6cbTp1{wjT;Sg80tgz<^d>YPHEHT2FwRI+YnI# zUOaa>&de}4n872+u3 zbZ~2e5Cy(GQMa+Y3DY7Cb682t zE1S!a#O3*gRi(x_f$}f+U~mpcKgg3kWN# zDMJM_A|(rfi_!*2OR$IU91dnQWWoX;>%+o6Z{E%tzEi!p^DE-4eAC%42ktUHuOKSS6du~lb8$az3g(Ee3O$U7DV|X zz-AZlo;^ocghjsp{|fHm|G@Y1xc|rPx;=h``~1g%G2jCpumzk3UPRr00{;MR1Kjra zfIA!mjseGjW56-s7;p?Y1{?#90mp!2z%lSzGJp+L9ND%jHLzQX;}L;