[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patches for building BLT on MacOS X
From: |
Bill Northcott |
Subject: |
Patches for building BLT on MacOS X |
Date: |
Mon, 9 Dec 2002 13:12:33 +1100 |
Hi George
Sorry about the triple address but you seem to have a number of addresses
in the documentation.
I have managed to get BLT2.4z to build and apparently run on MacOS X with
only minimal mods to configure.in and aclocal.m4. The Diffs are below
with comments. None of these things seem to be changed in the current
CVS.
My system is MacOS X 10.2.2 with all up to date patches. The compiler is
gcc3.3 from Apple CVS based on FSF gcc3.3 20021120.
Xfree86/XDarwin 4.2.1.1 with OroborosX 0.8b2 (which crashes on some Tk
tests)
Tcl/Tk are version 8.4.1 compiled as shared libraries.
Hopefully these mods could be incorporated in the CVS.
Thanks for all your good work.
Bill Northcott
School of Banking and Finance, UNSW
[qs-3051:~/Public/Swarm/blt2.4z] billn% diff -c configure.in
../blt2.4zbuild/configure.in
*** configure.in Fri Oct 4 05:33:23 2002
--- ../blt2.4zbuild/configure.in Thu Dec 5 12:32:51 2002
***************
# O6 is not documented on my compiler
*** 153,159 ****
elif test "x${blt_cv_prog_cflags}" != "x" ; then
CFLAGS=${blt_cv_prog_cflags}
elif test "${blt_have_gcc}" = "yes" ; then
! CFLAGS=-O6
else
CFLAGS=-O
fi
--- 153,159 ----
elif test "x${blt_cv_prog_cflags}" != "x" ; then
CFLAGS=${blt_cv_prog_cflags}
elif test "${blt_have_gcc}" = "yes" ; then
! CFLAGS=-O2
else
CFLAGS=-O
fi
***************
# As far as I know macosx will never be returned as a system name by
config.guess. 'unix' does nicely
*** 183,191 ****
blt_lib_prefix=""
fi
;;
- *-*-macosx)
- blt_platform="macosx"
- ;;
*)
blt_platform="unix"
;;
--- 183,188 ----
***************
# This confuses me. Just a comment
*** 658,663 ****
--- 655,661 ----
. $tcl_config_sh
. $tk_config_sh
+ # Why override tkConfig.sh and tclConfig.sh?
TCL_INC_DIR=""
TK_INC_DIR=""
***************
# The preferred shared library on Darwin/OS X is .dylib. Tcl/Tk builds
that way and so does BLT with these mods
# This override of of Config.sh files causes problems on Darwin
*** 721,733 ****
;;
esac
! TCL_LIB_SPEC="-l${TCL_LIB_NAME}"
! TK_LIB_SPEC="-l${TK_LIB_NAME}"
case $target in
*-hpux*)
SHLIB_SUFFIX="sl"
;;
*)
SHLIB_SUFFIX="so"
;;
--- 719,735 ----
;;
esac
! # Why override tkConfig.sh and tclConfig.sh
! # TCL_LIB_SPEC="-l${TCL_LIB_NAME}"
! # TK_LIB_SPEC="-l${TK_LIB_NAME}"
case $target in
*-hpux*)
SHLIB_SUFFIX="sl"
;;
+ *-*-darwin*)
+ SHLIB_SUFFIX="dylib"
+ ;;
*)
SHLIB_SUFFIX="so"
;;
***************
# Consistency with Tcl/Tk
*** 1053,1065 ****
SHLIB_LD_FLAGS="$TCL_LD_FLAGS"
SHLIB_RUNPATH="$TCL_LD_SEARCH_FLAGS"
! SHLIB_SUFFIX=".so"
SHLIB_TARGET=""
- SHLIB_CFLAGS=""
SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}"
- SHLIB_TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS}"
SHLIB_TCL_ONLY_LIB_SPECS=""
- LDFLAGS=""
LD_RUN_PATH=""
EXTRA_LIB_SPECS=""
--- 1055,1064 ----
SHLIB_LD_FLAGS="$TCL_LD_FLAGS"
SHLIB_RUNPATH="$TCL_LD_SEARCH_FLAGS"
! SHLIB_SUFFIX="$TCL_SHLIB_SUFFIX"
SHLIB_TARGET=""
SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}"
SHLIB_TCL_ONLY_LIB_SPECS=""
LD_RUN_PATH=""
EXTRA_LIB_SPECS=""
***************
# Darwin shared libs. -dynamiclib is used by Tcl but -shared might work.
-fno-common is vital
*** 1145,1150 ****
--- 1144,1158 ----
LDFLAGS=""
;;
+ *-*-darwin*)
+ SHLIB_LIB_SPECS="${LIB_SPECS}"
+ SHLIB_TCL_ONLY_LIB_SPECS="${TCL_LIB_SPEC}"
+ SHLIB_CFLAGS="-fno-common"
+ SHLIB_LD="${CC}"
+ SHLIB_LD_FLAGS='-dynamiclib'
+ LDFLAGS=""
+ ;;
+
*-dgux*)
SHLIB_CFLAGS="-K PIC"
SHLIB_LD="cc"
***************
# -fPIC is unnecessary but does no harm but we need to keep the
-fno-common from above
*** 1348,1355 ****
# compiler.
if test "$blt_have_gcc" = "yes" ; then
! SHLIB_CFLAGS="-fPIC"
fi
# We can't back link against static versions of Tcl/Tk.
--- 1356,1364 ----
# compiler.
+ #Why dump the OS dependent stuff?
if test "$blt_have_gcc" = "yes" ; then
! SHLIB_CFLAGS="${SHLIB_CFLAGS} -fPIC"
fi
# We can't back link against static versions of Tcl/Tk.
***************
# For testing only
*** 1414,1419 ****
--- 1423,1431 ----
echo " lib${TCL_LIB_NAME} found in $TCL_LIB_DIR"
echo " lib${TK_LIB_NAME} found in $TK_LIB_DIR"
echo " libX11 found in $x_libraries"
+ echo " SHLIB_CFLAGS $SHLIB_CFLAGS"
+ echo " SHLIB_LD $SHLIB_LD"
+ echo " SHLIB_LIB_SPECS $SHLIB_LIB_SPECS"
echo ""
echo "Directories where BLT is to be installed:"
echo ""
[qs-3051:~/Public/Swarm/blt2.4z] billn% diff -c aclocal.m4
../blt2.4zbuild/aclocal.m4
*** aclocal.m4 Wed Apr 3 08:25:20 2002
--- ../blt2.4zbuild/aclocal.m4 Wed Dec 4 19:32:45 2002
***************
# Obsolete autoconf syntax. Breaks on OS X 10.2 autoconf 2.55
*** 12,18 ****
cat > conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
! ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
extern "C" void exit(int);
#endif
])dnl
--- 12,18 ----
cat > conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
! ifelse(AC_LANG_CURRENT, C++, [#ifdef __cplusplus
extern "C" void exit(int);
#endif
])dnl
[qs-3051:~/Public/Swarm/blt2.4z] billn%
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patches for building BLT on MacOS X,
Bill Northcott <=