Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple issues when building on Windows/Linux/Darwin 2019 #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ versions.vc
/8.x/mk/builds/
/8.x/mk/win/Debug/
/8.x/mk/win/Release/
.DS_Store
2 changes: 1 addition & 1 deletion 8.x/tclvfs/generic/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include "tclPort.h"
#include <tcl.h>
/* Required to access the 'stat' structure fields, and TclInExit() */
#include "tclInt.h"
#include "tclPort.h"

/*
* Windows needs to know which symbols to export. Unix does not.
Expand Down
11 changes: 7 additions & 4 deletions config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ case $cli-$dyn-$gui in 0-0-0) cli=1 dyn=1 gui=1 ;; esac
case $mach in

Darwin)
sed -i '' 's/?=.so/?=.dylib/g' makefile.include
case $aqua in
1) echo "GUI_OPTS = -framework Carbon -framework IOKit" ;;
*) echo "GUI_OPTS = -L/usr/X11R6/lib -lX11 -weak-lXss -lXext" ;;
esac

echo "LDFLAGS = -framework CoreFoundation"
echo "LDFLAGS = -F/System/Library/Frameworks -framework CoreFoundation -framework AppKit"
echo "LDSTRIP = -x"

case $b64-$univ-$ppc-$x86 in
Expand All @@ -58,19 +59,21 @@ case $cli-$dyn-$gui in 0-0-0) cli=1 dyn=1 gui=1 ;; esac
1-0-0-1) echo "CFLAGS += -arch x86_64" ;;
1-?-?-?) echo "CFLAGS += -arch ppc64 -arch x86_64" ;;
esac
echo "CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk" \
"-mmacosx-version-min=10.4"
echo "CFLAGS += -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" \
"-mmacosx-version-min=10.6"

case $aqua in 1)
echo "TK_OPTS = --enable-aqua"
echo "TKDYN_OPTS = --enable-aqua" ;;
esac
[ -x "$upx" ] || upx=':'
echo "UPX = $upx"
;;

Linux)
echo "CC = ${CC:=gcc}"
echo "CXX = ${CXX:=gcc}"
echo "LDFLAGS = -ldl -lm"
echo "LDFLAGS = -ldl -lm -lfontconfig"
echo "LDXXFLAGS = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic"
echo "GUI_OPTS = -L/usr/X11R6/lib -lX11 -lXss"
if [ $root != "8.4" ]; then
Expand Down
2 changes: 1 addition & 1 deletion makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ ifeq ($(PLAT),win)
cp libz.a ../lib/libz.a && \
cp zlib.h zconf.h ../include/
else
cd $@ && CC=$(CC) CFLAGS=$(CFLAGS) sh configure && \
cd $@ && CC=$(CC) CFLAGS="$(CFLAGS)" sh configure && \
$(MAKE) install prefix=..
endif

Expand Down