--- a/config.lib Sat Mar 10 11:07:13 2007 +0000
+++ b/config.lib Sun Mar 11 16:31:18 2007 +0000
@@ -41,6 +41,7 @@
enable_strip="1"
enable_universal="1"
enable_osx_g5="0"
+ enable_unicode="1"
with_osx_sysroot="1"
with_application_bundle="1"
with_sdl="1"
@@ -58,7 +59,7 @@
with_fontconfig="1"
with_psp_config="1"
- save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os 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 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"
+ save_params_array="build host cc_build cc_host cxx_build cxx_host windres strip awk lipo os 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() {
@@ -168,6 +169,9 @@
--disable-osx-g5) enable_osx_g5="0";;
--enable-osx-g5) enable_osx_g5="2";;
--enable-osx-g5=*) enable_osx_g5="$optarg";;
+ --disable-unicode) enable_unicode="0";;
+ --enable-unicode) enable_unicode="2";;
+ --enable-unicode=*) enable_unicode="$optarg";;
--with-sdl) with_sdl="2";;
--without-sdl) with_sdl="0";;
@@ -271,7 +275,7 @@
echo "Running configure with following options:" >> $config_log
echo "" >> $config_log
- configure="$0 --ignore-extra-parameters"
+ configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters"
for p in $save_params_array; do
eval "v=\"\$$p\""
p=`echo "$p" | sed 's/_/-/g;s/\n//g;'`
@@ -370,6 +374,20 @@
log 1 "checking static... no"
fi
+ if [ "$enable_unicode" = "1" ]; then
+ if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
+ enable_unicode="2"
+ else
+ enable_unicode="0"
+ fi
+ fi
+
+ if [ "$enable_unicode" != "0" ]; then
+ log 1 "checking unicode... yes"
+ else
+ log 1 "checking unicode... no"
+ fi
+
# Show what we configured
if [ "$enable_debug" = "0" ]; then
log 1 "using debug level... no"
@@ -478,6 +496,10 @@
strip_arg=""
# OS2 uses strip via gcc, because it needs to be feed to emxbind
LDFLAGS="$LDFLAGS -s"
+ elif [ "$os" = "SUNOS" ]; then
+ # The GNU strip does know -s, the non-GNU doesn't
+ # So try to detect it (in a bit of an ugly way)
+ strip_arg="`$strip -s strip.test 2>/dev/null && echo \"-s\"`"
else
strip_arg="-s"
fi
@@ -727,10 +749,12 @@
if [ -n "$sdl_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL"
CFLAGS="$CFLAGS `$sdl_config --cflags`"
- if [ "$enable_static" != "0" ]; then
- LIBS="$LIBS `$sdl_config --static-libs`"
- else
- LIBS="$LIBS `$sdl_config --libs`"
+ if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
+ if [ "$enable_static" != "0" ]; then
+ LIBS="$LIBS `$sdl_config --static-libs`"
+ else
+ LIBS="$LIBS `$sdl_config --libs`"
+ fi
fi
fi
@@ -757,10 +781,27 @@
if [ "$os" = "OSX" ]; then
LIBS="$LIBS `$png_config --prefix`/lib/libpng.a"
else
- LIBS="$LIBS `$png_config --static --ldflags --libs --L_opts | tr '\n\r' ' '`"
+ LIBS="$LIBS `$png_config --static --ldflags | tr '\n\r' ' '`"
fi
else
- LIBS="$LIBS `$png_config --ldflags --libs --L_opts | tr '\n\r' ' '`"
+ LIBS="$LIBS `$png_config --ldflags | tr '\n\r' ' '`"
+ fi
+ fi
+
+ if [ -n "$fontconfig_config" ]; then
+ CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
+ CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
+
+ if [ "$enable_static" != "0" ]; then
+ if [ "$os" = "OSX" ]; then
+ # fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
+ # Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
+ LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s/-lfontconfig//`"
+ else
+ LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
+ fi
+ else
+ LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
fi
fi
@@ -780,21 +821,6 @@
fi
fi
- if [ -n "$fontconfig_config" ]; then
- CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
- CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' ' '`"
-
- if [ "$enable_static" != "0" ]; then
- if [ "$os" = "OSX" ]; then
- LIBS="$LIBS `$fontconfig_config --prefix`/lib/libfontconfig.a"
- else
- LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
- fi
- else
- LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' ' '`"
- fi
- fi
-
if [ "$with_direct_music" != "0" ]; then
CFLAGS="$CFLAGS -DWIN32_ENABLE_DIRECTMUSIC_SUPPORT"
# GCC 4.0+ doesn't like the DirectX includes (gives tons of
@@ -834,6 +860,10 @@
CFLAGS="$CFLAGS -DDEDICATED"
fi
+ if [ "$enable_unicode" != "0" ]; then
+ CFLAGS="$CFLAGS -DUNICODE -D_UNICODE"
+ fi
+
if [ "$enable_network" != "0" ]; then
CFLAGS="$CFLAGS -DENABLE_NETWORK"
@@ -1212,6 +1242,7 @@
/morphos/ { print "MORPHOS"; exit}
/beos/ { print "BEOS"; exit}
/sunos/ { print "SUNOS"; exit}
+ /solaris/ { print "SUNOS"; exit}
/cygwin/ { print "CYGWIN"; exit}
/mingw/ { print "MINGW"; exit}
/os2/ { print "OS2"; exit}
@@ -1540,6 +1571,12 @@
return 0
fi
+ if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ]; then
+ log 1 "checking libfontconfig... WIN32, skipping"
+ fontconfig_config=""
+ return 0
+ fi
+
if [ "$with_fontconfig" = "1" ] || [ "$with_fontconfig" = "" ] || [ "$with_fontconfig" = "2" ]; then
fontconfig_config="pkg-config fontconfig"
else