The following patches to autoconf stuff seem to be
enough to build the 2.4z distribution on MacOS X 10.2.x
(Jaguar) with Xfree86 and Tcl/Tk 8.4.1.
../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 ""
../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
Logged In: YES
user_id=108591
You only need these patches to build BLT 2.4z with Apple tools on either
10.2.x or 10.3x. Do NOT use any other patches with them.
Bill Northcott
Logged In: YES
user_id=374858
Hi Bill,
Any chance you could resend as a patch instead of a diff?
Thanks,
Tom
Logged In: YES
user_id=108591
It already is a patch! Just copy the diff out of your browser, and save as
say 'bltpatch.txt'.
Then cd into the top level of the BLT2.4z source tree and do:
patch -p2 < somepath/bltpatch.txt
autoconf
See 'man patch' the wonders of UNIX!
If you are having a good day, it should then build.
Bil Northcott
Logged In: YES
user_id=374858
Hi Bil,
That's what I thought :)
But saving it from the browser must be introducing some
changes in the text (including line feeds and html
conversions). These changes result in patch complaining
about a malformed patch at line nine. Even after doing the
obvious html transformations on less than, greater than, and
double quote, it still has problems.
Could you attach the patch as a file?
- Tom
Logged In: YES
user_id=374858
Bill,
Do all of the demos work with this patch applied?
- Tom
Logged In: YES
user_id=108591
As far as I remember, all the ones I tried worked, but that was not many.
Such problems as exist are probably in Tk rather than BLT.
The patch is only to the build system not the code of BLT.
We have a pre-alpha Aqua version of BLT (X11 not needed) built to work
with Aqua Tcl/Tk but it needs more work. I was sort of waiting for
Gordon to finally release BLT 3.0 before bothering with that.
If you want a binary, check out www.swarm.org and code repository on
Savannah.
Bill Northcott
Logged In: YES
user_id=374858
Bill,
Sorry, this was all my mistake. I was trying to build BLT
against Aqua/Tk instead of X11/Tk (ie, Aqua/Tk - what tcl
and tk make when you build from their macosx directory).
The only demos that don't work for me now are those that
have bad hard-coded paths.
Nice work!
Best regards,
Tom
Logged In: YES
user_id=785737
Originator: NO
I didn't have any issue extracting the text and regenerate the patch file, so I've posted it up to help close out this tracker. See http://ftp.brlcad.org/~sean/sf_patch_663450_blt24z.diff
Cheers!
Sean
Logged In: YES
user_id=12111
Originator: NO
This is not a patch and is worthless as it is. Please *attach* a file when posting a patch or it gets munged.
After much pain, I've cleaned this up and posted it. Download at: http://ford.anth.wsu.edu/~bdford/swarm/blt2.4z-osx-patch