(svn r9219) [NoAI] -Fix: fix up the configure to use the 3rdparty squirrel (and not the system-one) noai
authortruelight
Thu, 15 Mar 2007 18:57:20 +0000
branchnoai
changeset 9419 0736fa1c5d26
parent 9418 ed33908db4b4
child 9420 b2fcb7cbff1f
(svn r9219) [NoAI] -Fix: fix up the configure to use the 3rdparty squirrel (and not the system-one)
Makefile.in
config.lib
--- a/Makefile.in	Thu Mar 15 18:38:27 2007 +0000
+++ b/Makefile.in	Thu Mar 15 18:57:20 2007 +0000
@@ -31,10 +31,11 @@
 OSXAPP = !!OSXAPP!!
 REVISION = !!REVISION!!
 AWK = !!AWK!!
+SQUIRREL_MAKE_FLAG = !!SQUIRREL_MAKE_FLAG!!
 
 RES := $(shell if ! [ -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST)`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
 
-all: config.cache
+all: config.cache squirrel
 	@for dir in $(DIRS); do \
 		$(MAKE) -C $$dir all; \
 	done
@@ -70,6 +71,7 @@
 	@for dir in $(DIRS); do \
 		$(MAKE) -C $$dir clean; \
 	done
+	$(MAKE) -C 3rdparty/squirrel clean
 	$(Q)rm -rf $(BUNDLE_TARGET)
 
 lang:
@@ -77,6 +79,9 @@
 		$(MAKE) -C $$dir all; \
 	done
 
+squirrel:
+	$(MAKE) -C 3rdparty/squirrel $(SQUIRREL_MAKE_FLAG)
+
 mrproper:
 	@for dir in $(DIRS); do \
 		$(MAKE) -C $$dir mrproper; \
--- a/config.lib	Thu Mar 15 18:38:27 2007 +0000
+++ b/config.lib	Thu Mar 15 18:57:20 2007 +0000
@@ -59,9 +59,8 @@
 	with_freetype="1"
 	with_fontconfig="1"
 	with_psp_config="1"
-	with_squirrel="1"
 
-	save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os cpu_type revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir custom_lang_dir second_data_dir enable_install enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_osx_sysroot enable_universal enable_osx_g5 enable_unicode with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_libtimidity with_freetype with_fontconfig with_psp_config with_squirrel CC CXX CFLAGS LDFLAGS"
+	save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os cpu_type revision endian config_log prefix_dir binary_dir data_dir icon_dir personal_dir install_dir custom_lang_dir second_data_dir enable_install enable_debug enable_profiling enable_dedicated enable_network enable_static enable_translator enable_assert enable_strip with_osx_sysroot enable_universal enable_osx_g5 enable_unicode with_application_bundle with_sdl with_cocoa with_zlib with_png with_makedepend with_direct_music with_sort with_iconv with_midi with_midi_arg with_libtimidity with_freetype with_fontconfig with_psp_config CC CXX CFLAGS LDFLAGS"
 }
 
 detect_params() {
@@ -197,10 +196,6 @@
 			--without-libpng)             with_png="0";;
 			--with-libpng=*)              with_png="$optarg";;
 
-			--with-squirrel)              with_squirrel="2";;
-			--without-squirrel)           with_squirrel="0";;
-			--with-squirrel=*)            with_squirrel="$optarg";;
-
 			--with-libtimidity)           with_libtimidity="2";;
 			--without-libtimidity)        with_libtimidity="0";;
 			--with-libtimidity=*)         with_libtimidity="$optarg";;
@@ -468,11 +463,13 @@
 	detect_png
 	detect_freetype
 	detect_fontconfig
-	detect_squirrel
 	detect_iconv
 	detect_pspconfig
 	detect_libtimidity
 
+	squirrel_root="$ROOT_DIR/3rdparty/squirrel"
+	squirrel_libs="$squirrel_root/lib/libsquirrel.a $squirrel_root/lib/libsqstdlib.a"
+
 	if [ "$with_direct_music" = "1" ] || [ "$with_direct_music" = "2" ]; then
 		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
 			if [ "$with_direct_music" = "2" ]; then
@@ -790,13 +787,13 @@
 		CFLAGS="$CFLAGS -DWITH_ZLIB"
 	fi
 
-	if [ "$with_squirrel" != "0" ]; then
-		LIBS="$LIBS $squirrel `echo $squirrel | sed s/libsquirrel/libsqstdlib/`"
-		CFLAGS="$CFLAGS -DWITH_SQUIRREL"
-		# 64bit machines need -D_SQ64
-		if [ "$cpu_type" = "64" ]; then
-			CFLAGS="$CFLAGS -D_SQ64"
-		fi
+	LIBS="$LIBS $squirrel_libs"
+	CFLAGS="$CFLAGS -DWITH_SQUIRREL -I$squirrel_root/include"
+	squirrel_make_flag=""
+	# 64bit machines need -D_SQ64
+	if [ "$cpu_type" = "64" ]; then
+		CFLAGS="$CFLAGS -D_SQ64"
+		squirrel_make_flag="sq64"
 	fi
 
 	if [ -n "$png_config" ]; then
@@ -1500,10 +1497,6 @@
 	detect_library "$with_zlib" "zlib" "libz.a" "zlib.h"
 }
 
-detect_squirrel() {
-	detect_library "$with_squirrel" "squirrel" "libsquirrel.a" "squirrel.h" "static"
-}
-
 detect_libtimidity() {
 	detect_library "$with_libtimidity" "libtimidity" "libtimidity.a" "timidity.h"
 }
@@ -1907,6 +1900,7 @@
 		s#!!REVISION!!#$revision#g;
 		s#!!AWK!!#$awk#g;
 		s#!!ENABLE_INSTALL!!#$enable_install#g;
+		s#!!SQUIRREL_MAKE_FLAG!!#$squirrel_make_flag#g;
 	"
 }