--enable-ipc use interprocess communication (wxSocket etc.)
--enable-apple_ieee use the Apple IEEE codec
--enable-catch_segvs catch signals in wxApp::OnFatalException (Unix only)
+ --enable-backtrace use wxStackWalker class for getting backtraces
--enable-cmdline use wxCmdLineParser class
--enable-datetime use wxDateTime class
--enable-dialupman use dialup network classes
DEFAULT_wxUSE_OPENGL=no
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=no
+ DEFAULT_wxUSE_STACKWALKER=no
DEFAULT_wxUSE_SNGLINST_CHECKER=no
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_CMDLINE_PARSER=no
DEFAULT_wxUSE_OPENGL=no
DEFAULT_wxUSE_ON_FATAL_EXCEPTION=yes
+ DEFAULT_wxUSE_STACKWALKER=yes
DEFAULT_wxUSE_SNGLINST_CHECKER=yes
DEFAULT_wxUSE_STD_IOSTREAM=no
DEFAULT_wxUSE_CMDLINE_PARSER=yes
fi
+ enablestring=
+ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-backtrace" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-backtrace... $ECHO_C" >&6
+ no_cache=0
+ # Check whether --enable-backtrace or --disable-backtrace was given.
+if test "${enable_backtrace+set}" = set; then
+ enableval="$enable_backtrace"
+
+ if test "$enableval" = yes; then
+ ac_cv_use_backtrace='wxUSE_STACKWALKER=yes'
+ else
+ ac_cv_use_backtrace='wxUSE_STACKWALKER=no'
+ fi
+
+else
+
+ LINE=`grep "wxUSE_STACKWALKER" ${wx_arg_cache_file}`
+ if test "x$LINE" != x ; then
+ eval "DEFAULT_$LINE"
+ else
+ no_cache=1
+ fi
+
+ ac_cv_use_backtrace='wxUSE_STACKWALKER='$DEFAULT_wxUSE_STACKWALKER
+
+fi;
+
+ eval "$ac_cv_use_backtrace"
+ if test "$no_cache" != 1; then
+ echo $ac_cv_use_backtrace >> ${wx_arg_cache_file}.tmp
+ fi
+
+ if test "$wxUSE_STACKWALKER" = yes; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+
+
enablestring=
echo "$as_me:$LINENO: checking for --${enablestring:-enable}-cmdline" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-cmdline... $ECHO_C" >&6
fi
fi
+if test "$wxUSE_STACKWALKER" = "yes" -a "$wxUSE_UNIX" = "yes"; then
+
+
+ ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+ echo "$as_me:$LINENO: checking for backtrace() in <execinfo.h>" >&5
+echo $ECHO_N "checking for backtrace() in <execinfo.h>... $ECHO_C" >&6
+if test "${wx_cv_func_backtrace+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <execinfo.h>
+int
+main ()
+{
+
+ void *trace[1];
+ char **messages;
+
+ backtrace(trace, 1);
+ messages = backtrace_symbols(trace, 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ wx_cv_func_backtrace=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+wx_cv_func_backtrace=no
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+echo "$as_me:$LINENO: result: $wx_cv_func_backtrace" >&5
+echo "${ECHO_T}$wx_cv_func_backtrace" >&6
+
+
+ if test "$wx_cv_func_backtrace" = "no"; then
+ { echo "$as_me:$LINENO: WARNING: backtrace() is not available, wxStackWalker will not be available" >&5
+echo "$as_me: WARNING: backtrace() is not available, wxStackWalker will not be available" >&2;}
+ wxUSE_STACKWALKER=no
+ else
+ echo "$as_me:$LINENO: checking for __cxa_demangle() in <cxxabi.h>" >&5
+echo $ECHO_N "checking for __cxa_demangle() in <cxxabi.h>... $ECHO_C" >&6
+if test "${wx_cv_func_cxa_demangle+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <cxxabi.h>
+int
+main ()
+{
+
+ int rc;
+ __cxxabiv1::__cxa_demangle("foo", 0, 0, &rc);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ wx_cv_func_cxa_demangle=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+wx_cv_func_cxa_demangle=no
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+echo "$as_me:$LINENO: result: $wx_cv_func_cxa_demangle" >&5
+echo "${ECHO_T}$wx_cv_func_cxa_demangle" >&6
+
+ if test "$wx_cv_func_cxa_demangle" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_CXA_DEMANGLE 1
+_ACEOF
+
+ fi
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+
for ac_func in mkstemp mktemp
sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
- ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
rm -f conf.sdltest
if test "$cross_compiling" = yes; then
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$ac_save_CFLAGS"
- CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
- CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
CFLAGS="$ac_save_CFLAGS"
- CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
fi
+if test "$wxUSE_STACKWALKER" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define wxUSE_STACKWALKER 1
+_ACEOF
+
+fi
+
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_SNGLINST_CHECKER 1
fi
if test "$wxUSE_STATUSBAR" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define wxUSE_NATIVE_STATUSBAR 1
+_ACEOF
+
cat >>confdefs.h <<\_ACEOF
#define wxUSE_STATUSBAR 1
_ACEOF
;;
*-pc-os2_emx | *-pc-os2-emx )
- SHARED_LD_CC="`pwd`/dllar.sh -o"
- SHARED_LD_CXX="`pwd`/dllar.sh -o"
+ SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
+ SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
PIC_FLAG=""
D='$'
# Print usage and exit script with rc=1.
PrintHelp() {
- echo 'Usage: dllar [-o@<:${utput}:>@ output_file] [-i@<:${mport}:>@ importlib_name]'
- echo ' [-d@<:${escription}:>@ "dll descrption"] [-cc "CC"] [-f@<:${lags}:>@ "CFLAGS"]'
- echo ' [-ord@<:${inals}:>@] -ex@<:${clude}:>@ "symbol(s)"'
- echo ' [-libf@<:${lags}:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"] [-nocrt@<:${dll}:>@] [-nolxl@<:${ite}:>@]'
+ echo 'Usage: dllar.sh [-o[utput] output_file] [-i[mport] importlib_name]'
+ echo ' [-name-mangler-script script.sh]'
+ echo ' [-d[escription] "dll descrption"] [-cc "CC"] [-f[lags] "CFLAGS"]'
+ echo ' [-ord[inals]] -ex[clude] "symbol(s)"'
+ echo ' [-libf[lags] "{INIT|TERM}{GLOBAL|INSTANCE}"] [-nocrt[dll]] [-nolxl[ite]]'
echo ' [*.o] [*.a]'
echo '*> "output_file" should have no extension.'
echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
echo ' This name is used as the import library name and may be longer and'
echo ' more descriptive than the DLL name which has to follow the old '
echo ' 8.3 convention of FAT.'
+ echo '*> "script.sh may be given to override the output_file name by a'
+ echo ' different name. It is mainly useful if the regular make process'
+ echo ' of some package does not take into account OS/2 restriction of'
+ echo ' DLL name lengths. It takes the importlib name as input and is'
+ echo ' supposed to procude a shorter name as output. The script should'
+ echo ' expect to get importlib_name without extension and should produce'
+ echo ' a (max.) 8 letter name without extension.'
echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
echo ' These flags will be put at the start of GCC command line.'
- echo '*> -ord@<:${inals}:>@ tells dllar to export entries by ordinals. Be careful.'
- echo '*> -ex@<:${clude}:>@ defines symbols which will not be exported. You can define'
+ echo '*> -ord[inals] tells dllar to export entries by ordinals. Be careful.'
+ echo '*> -ex[clude] defines symbols which will not be exported. You can define'
echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
echo ' If the last character of a symbol is "*", all symbols beginning'
echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
- echo '*> -libf@<:${lags}:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
+ echo '*> -libf[lags] can be used to add INITGLOBAL/INITINSTANCE and/or'
echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
- echo '*> -nocrt@<:${dll}:>@ switch will disable linking the library against emx''s'
+ echo '*> -nocrt[dll] switch will disable linking the library against emx''s'
echo ' C runtime DLLs.'
- echo '*> -nolxl@<:${ite}:>@ switch will disable running lxlite on the resulting DLL.'
+ echo '*> -nolxl[ite] switch will disable running lxlite on the resulting DLL.'
echo '*> All other switches (for example -L./ or -lmylib) will be passed'
echo ' unchanged to GCC at the end of command line.'
echo '*> If you create a DLL from a library and you do not specify -o,'
outFile=""
outimpFile=""
inputFiles=""
+renameScript=""
description=""
CC=gcc.exe
CFLAGS="-s -Zcrtdll"
esac
# Parse commandline
libsToLink=0
+omfLinking=0
while [ ${D}1 ]; do
case ${D}1 in
-ord*)
shift
outimpFile=${D}1
;;
+ -name-mangler-script)
+ shift
+ renameScript=${D}1
+ ;;
-d*)
shift
description=${D}1
-L* | -l*)
libsToLink=1
;;
+ -Zomf)
+ omfLinking=1
+ ;;
*)
;;
esac
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
;;
+ *.dll)
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
+ if [ ${D}omfLinking -eq 1 ]; then
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
+ else
+ EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
+ fi
+ ;;
*)
found=0;
if [ ${D}libsToLink -ne 0 ]; then
defFile="${D}{outFile}.def"
arcFile="${D}{outimpFile}.a"
arcFile2="${D}{outimpFile}.lib"
-dllFile="${D}outFile"
-# Add suffix to dllFile later, first we need a version to use as
-# name in .def file.
+
+#create ${D}dllFile as something matching 8.3 restrictions,
+if [ -z ${D}renameScript ] ; then
+ dllFile="${D}outFile"
+else
+ dllFile=\`${D}renameScript ${D}outimpFile\`
+fi
if [ ${D}do_backup -ne 0 ] ; then
if [ -f ${D}arcFile ] ; then
# Create the def file.
rm -f ${D}defFile
echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
-dllFile="${D}dllFile.dll"
-if [ -n ${D}description ]; then
+dllFile="${D}{dllFile}.dll"
+if [ ! -z ${D}description ]; then
echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
fi
echo "EXPORTS" >> ${D}defFile
SONAME_FLAG=
case "${BAKEFILE_HOST}" in
- *-*-linux* )
- SONAME_FLAG="-Wl,-soname,"
- USE_SOVERSION=1
- USE_SOVERLINUX=1
- USE_SOSYMLINKS=1
- ;;
-
- *-*-freebsd* )
+ *-*-linux* | *-*-freebsd* )
SONAME_FLAG="-Wl,-soname,"
USE_SOVERSION=1
USE_SOVERLINUX=1
esac
echo "$as_me:$LINENO: result: gcc" >&5
echo "${ECHO_T}gcc" >&6
+ elif test "x$MWCC" = "xyes"; then
+ DEPSMODE=gcc
+ DEPS_TRACKING=1
+ DEPSFLAG_GCC="-MMD"
+ echo "$as_me:$LINENO: result: mwcc" >&5
+echo "${ECHO_T}mwcc" >&6
else
echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
- BAKEFILE_BAKEFILE_M4_VERSION="0.1.4"
+ BAKEFILE_BAKEFILE_M4_VERSION="0.1.5"
-
-
-
-BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.4"
+BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.5"
-
-
COND_BUILD_DEBUG="#"
if test "x$BUILD" = "xdebug" ; then
COND_BUILD_DEBUG=""