dnl distribute only wxBase sources/headers
GUIDIST="BASE_DIST"
DISTDIR="wxBase"
-
- dnl Apple MAC OS X specific extras
- if test "$USE_UNIX" = 1 ; then
- ALL_OBJECTS="${ALL_OBJECTS} dl_macosx.o"
- ALL_DEPFILES="${ALL_DEPFILES} dl_macosx.d"
- fi
fi
dnl the name of the (libtool) library
dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what
dnl we'll find under MSW if it exists.
+dnl final note: AC_TRY_COMPILE will only be executed if there is nothing in
+dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside
+dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure
+dnl runs
+
dnl check for vsnprintf() - a safe version of vsprintf()
AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf,
[
vsnprintf(s, 42, fmt, argp);
va_end(argp);
], [
- AC_DEFINE(HAVE_VSNPRINTF)
wx_cv_func_vsnprintf=yes
], [
AC_TRY_COMPILE([
_vsnprintf(s, 42, fmt, argp);
va_end(argp);
], [
- AC_DEFINE(HAVE_VSNPRINTF)
wx_cv_func_vsnprintf=yes
], [
- AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
wx_cv_func_vsnprintf=no
])
])
])
+if test "$wx_cv_func_vsnprintf" = yes; then
+ AC_DEFINE(HAVE_VSNPRINTF)
+else
+ AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf)
+fi
+
dnl check for vsscanf()
AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf,
[
vsscanf("42", fmt, argp);
va_end(argp);
], [
- AC_DEFINE(HAVE_VSSCANF)
wx_cv_func_vsscanf=yes
], [
wx_cv_func_vsscanf=no
])
])
+if test "$wx_cv_func_vsscanf" = yes; then
+ AC_DEFINE(HAVE_VSSCANF)
+fi
+
AC_LANG_RESTORE
dnl the following tests are for Unix(like) systems only
if test "$wxUSE_THREADS" = "yes"; then
AC_DEFINE(wxUSE_THREADS)
- dnl must define _REENTRANT for multithreaded code
- CFLAGS="${CFLAGS} -D_REENTRANT"
- CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ dnl must define _REENTRANT for multithreaded code except for Mac OS X
+ if test "$wxUSE_MAC" = "0"; then
+ CFLAGS="${CFLAGS} -D_REENTRANT"
+ CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
else
fi
if test "$wxUSE_MAC" = 1 ; then
- TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -DTARGET_CARBON"
+ TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON"
TOOLKIT_INCLUDE="${TOOLKIT_INCLUDE}"
fi
wxUSE_DRAG_AND_DROP=no
fi
+ if test "$wxUSE_MAC" = 1; then
+ AC_MSG_WARN([Drag and drop is not yet supported under Mac OS X])
+ wxUSE_DRAG_AND_DROP=no
+ fi
+
if test "$USE_WIN32" = 1; then
dnl check for ole headers and disable DnD if not present (earlier
dnl versions of mingw32 don't have them)
mkdir lib/wx/include/wx/${TOOLKIT_NAME}
fi
if test -f setup.h; then
- cp -f setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h
+ cp -fp setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h
fi
dnl *move* setup.h to its final place
mkdir include/wx/${TOOLKIT_DIR}
fi
if test -f setup.h; then
- mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h
+ cp -fp setup.h include/wx/${TOOLKIT_DIR}/setup.h
fi
],