INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be"
fi
-dnl Linux: test for libc5/glibc2: glibc2 has gettext() included
+dnl check for glibc version
if test "$USE_LINUX" = 1; then
- AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2))
+ AC_CACHE_CHECK([for glibc 2.1 or later], wx_lib_glibc21,
+ AC_TRY_COMPILE([#include <features.h>],
+ [
+ #if !__GLIBC_PREREQ(2, 1)
+ #error not glibc2.1
+ #endif
+ ],
+ [
+ wx_lib_glibc21=yes
+ ],
+ [
+ wx_lib_glibc21=no
+ ]
+ )
+ )
+
+ if test "$wx_lib_glibc21" = "yes"; then
+ AC_DEFINE(wxHAVE_GLIBC2)
+ fi
fi
dnl ---------------------------------------------------------------------------
DEFAULT_wxUSE_MSGDLG=no
DEFAULT_wxUSE_NUMBERDLG=no
DEFAULT_wxUSE_TEXTDLG=no
+ DEFAULT_wxUSE_SPLASH=no
DEFAULT_wxUSE_STARTUP_TIPS=no
DEFAULT_wxUSE_PROGRESSDLG=no
DEFAULT_wxUSE_WIZARDDLG=no
DEFAULT_wxUSE_MSGDLG=yes
DEFAULT_wxUSE_NUMBERDLG=yes
DEFAULT_wxUSE_TEXTDLG=yes
+ DEFAULT_wxUSE_SPLASH=yes
DEFAULT_wxUSE_STARTUP_TIPS=yes
DEFAULT_wxUSE_PROGRESSDLG=yes
DEFAULT_wxUSE_WIZARDDLG=yes
WX_ARG_ENABLE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG)
WX_ARG_ENABLE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG)
WX_ARG_ENABLE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG)
+WX_ARG_ENABLE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH)
WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG)
WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS)
WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG)
dnl flush the cache because checking for libraries below might abort
AC_CACHE_SAVE
+dnl ------------------------------------------------------------------------
+dnl Check for regex libraries
+dnl ------------------------------------------------------------------------
+
+REGEX_INCLUDE=
+if test "$wxUSE_REGEX" != "no"; then
+ dnl according to Unix 98 specs, regcomp() is in libc but I believe that
+ dnl on some old systems it may be in libregex - check for it too?
+ AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp))
+
+ if test "x$ac_cv_func_regcomp" != "xyes"; then
+ dnl we were asked to use the system version of regex lib only but it
+ dnl is not available
+ if test "$wxUSE_REGEX" = "sys"; then
+ AC_MSG_ERROR([system regex library not found! Use --with-regex to use the built-in regex library.])
+ fi
+
+ dnl fallback to the built in code
+ REGEX_INCLUDE="-I\${top_srcdir}/src/regex"
+ fi
+
+ AC_DEFINE(wxUSE_REGEX)
+fi
+
dnl ----------------------------------------------------------------
dnl search for toolkit (widget sets)
dnl ----------------------------------------------------------------
WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a"
-dnl the name of the shared library
-WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
-WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
-
-dnl the name of the links to the shared library
-WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}"
-WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so"
-WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so"
-WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}"
-WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so"
-WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so"
-
-dnl shared library settings
-SHARED_LD=
-PIC_FLAG=
-WX_ALL=
-WX_ALL_INSTALLED=
-BURNT_LIBRARY_NAME=
-WX_TARGET_LIBRARY_SONAME=
-
dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
if test "$wxUSE_SHARED" = "yes"; then
+ dnl the name of the shared library
case "${host}" in
+ *-*-mingw32* )
+ WX_LIBRARY_NAME_SHARED="wx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.dll"
+ ;;
+
*-hp-hpux* )
- if test "$GCC" = yes ; then
- SHARED_LD="${CC} -shared -fPIC -o"
- PIC_FLAG="-fPIC"
- else
+ SO_SUFFIX="sl"
+ ;;
+
+ *-*-darwin* )
+ SO_SUFFIX="dylib"
+ ;;
+
+ * )
+ SO_SUFFIX="so"
+ ;;
+ esac
+
+ dnl set the name of the shared lib if not done above
+ if test "x$SO_SUFFIX" != "x"; then
+ WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+ WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
+ fi
+
+ dnl the name of the links to the shared library
+ WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}"
+ WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}"
+ WX_LIBRARY_LINK3="lib${WX_LIBRARY}.${SO_SUFFIX}"
+ WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}"
+ WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}"
+ WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.${SO_SUFFIX}"
+
+ dnl install targets
+ if test "$wxUSE_OPENGL" = "yes"; then
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
+ WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
+ else
+ WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
+ WX_ALL="CREATE_LINKS"
+ fi
+
+ dnl the extra compiler flags needed for compilation of shared library
+ if test "$GCC" = "yes"; then
+ dnl the switch for gcc is the same under all platforms
+ PIC_FLAG="-fPIC"
+ fi
+
+ dnl the command to use for creating the shared library
+ SHARED_LD="${CXX} -shared -o"
+
+ case "${host}" in
+ *-hp-hpux* )
+ dnl default settings are good for gcc but not for the native HP-UX
+ if test "$GCC" != "yes"; then
dnl no idea why it wants it, but it does
LDFLAGS="-L/usr/lib"
SHARED_LD="${CXX} -b -o"
PIC_FLAG="+Z"
fi
- WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_NAME}.sl"
- WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_NAME}_gl.sl"
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="preinstall_gl"
- WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}"
- else
- WX_ALL="${WX_LIBRARY_NAME_SHARED}"
- fi
+
;;
- dnl in fact, these settings are for any platform using gcc
*-*-linux* )
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
+ if test "$GCC" != "yes"; then
+ AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc,
+ [
+ AC_TRY_COMPILE([],
+ [
+ #ifndef __INTEL_COMPILER
+ #error Not icc
+ #endif
+ ],
+ wx_cv_prog_icc=yes,
+ wx_cv_prog_icc=no
+ )
+ ])
+
+ if test "$wx_cv_prog_icc" = "yes"; then
+ PIC_FLAG="-KPIC"
+ fi
+ fi
+
if test "$wxUSE_BURNT_NAME" = "yes" ; then
BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}"
BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}"
dnl substitute this in makelib.env for the contrib libs
WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)"
fi
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- fi
- ;;
- *-*-irix5* | *-*-irix6* )
- if test "$GCC" = yes ; then
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
- else
- SHARED_LD="${CXX} -shared -o"
- fi
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- fi
;;
+
*-*-solaris2* )
if test "$GCC" = yes ; then
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
-
dnl newer versions of gcc need -isystem to compile X headers on
dnl Solaris (which use old style C syntax)
CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include"
SHARED_LD="${CXX} -G -o"
PIC_FLAG="-KPIC"
fi
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- fi
- ;;
- *-*-sunos4* )
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- ;;
- *-*-freebsd* | *-*-openbsd* | *-*-netbsd* )
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- fi
;;
+
*-*-darwin* )
- TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__"
- CFLAGS="${CFLAGS} -fno-common"
- CPPFLAGS="${CPPFLAGS} -fno-common"
+ TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__"
+ CPPFLAGS="${CPPFLAGS} -fno-common"
SHARED_LD="${CXX} -dynamiclib -o"
PIC_FLAG="-dynamic -fPIC"
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="CREATE_LINKS CREATE_LINKS_GL"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- fi
+
dnl add the resources target for wxMac
- if test "$wxUSE_MAC" = 1 ; then
- WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r"
- fi
- dnl the name of the shared library
- WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
- WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
- dnl the name of the links to the shared library
- WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}"
- WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.dylib"
- WX_LIBRARY_LINK3="lib${WX_LIBRARY}.dylib"
- WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}"
- WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib"
- WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.dylib"
- ;;
- *-*-osf* )
- SHARED_LD="${CXX} -shared -o"
- PIC_FLAG="-fPIC"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- ;;
- *-*-dgux5* )
- SHARED_LD="${CXX} -shared -o"
- PIC_FLAG="-fPIC"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
- ;;
- *-*-sysv5* )
- SHARED_LD="${CC} -shared -o"
- PIC_FLAG="-fPIC"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
+ if test "$wxUSE_MAC" = 1 ; then
+ WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r"
+ fi
;;
+
*-*-aix* )
SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o"
- WX_ALL=${WX_LIBRARY_NAME_SHARED}
;;
+
*-*-cygwin* )
dnl only static for now
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
WX_ALL="${WX_LIBRARY_NAME_STATIC}"
fi
;;
+
*-*-mingw32* )
- dnl only static for now
- WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
- WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}"
+ WX_LIBRARY_NAME_STATIC="lib/libwx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.a"
+ SHARED_LD="${CC} -shared -Wl,--out-implib,${WX_LIBRARY_NAME_STATIC} -o"
+ TOOLKIT_DEF="${TOOLKIT_DEF} -DWXUSINGDLL=1"
+ WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
+ WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
if test "$wxUSE_OPENGL" = "yes"; then
WX_ALL_INSTALLED="preinstall_gl"
- WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}"
+ WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}"
else
- WX_ALL="${WX_LIBRARY_NAME_STATIC}"
+ WX_ALL="${WX_LIBRARY_NAME_SHARED}"
fi
;;
+
*-pc-os2_emx )
dnl only static for now
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
WX_ALL="${WX_LIBRARY_NAME_STATIC}"
;;
+
*-*-beos* )
dnl can't use gcc under BeOS for shared library creation because it
dnl complains about missing 'main'
SHARED_LD="${LD} -shared -o"
- PIC_FLAG="-fPIC"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="CREATE_LINKS"
;;
+
+ *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
+ *-*-sunos4* | \
+ *-*-irix5* | *-*-irix6* | \
+ *-*-osf* | \
+ *-*-dgux5* | \
+ *-*-sysv5* )
+ dnl defaults are ok
+ ;;
+
*)
AC_MSG_ERROR(unknown system type ${host}.)
esac
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}"
fi
+
dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic
WX_TARGET_LIBRARY_TYPE="so"
else
if test "$USE_WIN32" = 1; then
AC_CHECK_HEADERS(w32api.h)
+
+ dnl check if can use _WIN_IE macro
+ AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win_ie,
+ [
+ AC_TRY_COMPILE([#include <w32api.h>],
+ [
+ #define wxCHECK_W32API_VERSION( major, minor ) \
+ ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \
+ && ( ( __W32API_MAJOR_VERSION > (major) ) \
+ || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor))))
+
+ #if !wxCHECK_W32API_VERSION(1,1)
+ #error You need w32api 1.1 or newer
+ #endif
+ ], [
+ wx_cv_w32api_win_ie=yes
+ CPPFLAGS="$CPPFLAGS -D_WIN_IE=0x400"
+ ], [
+ wx_cv_w32api_win_ie=no
+ ])
+ ])
fi
dnl ---------------------------------------------------------------------------
AC_CHECK_LIB(w, wcslen, [
AC_DEFINE(HAVE_WCSLEN)
WCHAR_LINK="-lw"
+ ], [
+ AC_CHECK_LIB(msvcrt, wcslen, [
+ AC_DEFINE(HAVE_WCSLEN)
+ WCHAR_LINK=""
+ ])
])
])
dnl check for vfork() (even if it's the same as fork() in modern Unices)
AC_CHECK_FUNCS(vfork)
+dnl get the library function to use for wxGetDiskSpace()
+AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
+ AC_TRY_COMPILE(
+ [
+ #include <sys/vfs.h>
+ ],
+ [
+ long l;
+ struct statfs fs;
+ statfs("/", &fs);
+ l = fs.f_bsize;
+ l += fs.f_blocks;
+ l += fs.f_bavail;
+ ],
+ [
+ wx_cv_func_statfs=yes
+ ],
+ [
+ wx_cv_func_statfs=no
+ ]
+ )
+)
+
+if test "$wx_cv_func_statfs" = "yes"; then
+ AC_DEFINE(HAVE_STATFS)
+else
+ AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
+fi
+
dnl check for fcntl() or at least flock() needed by Unix implementation of
dnl wxSingleInstanceChecker
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
dnl defined, we do it by directly assigned
dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr
+ dnl we need _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+
+ dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining
+ dnl this disables _BSD_SOURCE which breaks libtiff compilation, so it is
+ dnl simpler to just define _GNU_SOURCE to get everything)
+ if test "x$wx_lib_glibc21" = "xyes"; then
+ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+ fi
+
AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t,
[
AC_TRY_COMPILE([#include <pthread.h>],
dnl building MT programs under Solaris with the native compiler requires -mt
dnl switch
if test "$USE_SOLARIS" = "yes" -a "$GCC" != "yes"; then
- CFLAGS="${CFLAGS} -mt"
+ CPPFLAGS="${CFLAGS} -mt"
CXXFLAGS="${CXXFLAGS} -mt"
LDFLAGS="${LDFLAGS} -mt"
fi
dnl must define _REENTRANT for multithreaded code except for Darwin/Mac OS X
if test "$USE_DARWIN" != 1; then
- CFLAGS="${CFLAGS} -D_REENTRANT"
- CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
fi
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
if test "$ac_cv_func_strtok_r" = "yes"; then
AC_MSG_CHECKING(if -D_REENTRANT is needed)
if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then
- CFLAGS="${CFLAGS} -D_REENTRANT"
- CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
if test "$wxUSE_MAC" = 1 ; then
TOOLKIT_DEF="${TOOLKIT_DEF} -DTARGET_CARBON"
- CFLAGS="${CFLAGS} -fpascal-strings"
- CPPFLAGS="${CPPFLAGS} -cpp-precomp -fpascal-strings"
+ CPPFLAGS="${CPPFLAGS} -fpascal-strings"
+ CXXFLAGS="${CXXFLAGS} -cpp-precomp"
AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez)
RESCOMP=${REZ}
dnl Optional libraries
dnl ---------------------------------------------------------------------------
-REGEX_INCLUDE=
-if test "$wxUSE_REGEX" != "no"; then
- dnl according to Unix 98 specs, regcomp() is in libc but I believe that
- dnl on some old systems it may be in libregex - check for it too?
- AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp))
-
- if test "x$ac_cv_func_regcomp" != "xyes"; then
- dnl we were asked to use the system version of regex lib only but it
- dnl is not available
- if test "$wxUSE_REGEX" = "sys"; then
- AC_MSG_ERROR([system regex library not found! Use --with-regex to use the built-in regex library.])
- fi
-
- dnl fallback to the built in code
- REGEX_INCLUDE="-I\${top_srcdir}/src/regex"
- fi
-
- AC_DEFINE(wxUSE_REGEX)
-fi
-
ZLIB_INCLUDE=
if test "$wxUSE_ZLIB" = "yes" -o "$wxUSE_ZLIB" = "sys" ; then
AC_DEFINE(wxUSE_ZLIB)
AC_DEFINE(wxUSE_STREAMS)
fi
-dnl ------------------------------------------------------------------------
+dnl ---------------------------------------------------------------------------
dnl time/date functions
dnl ------------------------------------------------------------------------
],
[
struct timeval tv;
- struct timezone tz;
- gettimeofday(&tv, &tz);
+ gettimeofday(&tv, NULL);
],
wx_cv_func_gettimeofday_has_2_args=yes,
AC_TRY_COMPILE(
gettimeofday(&tv);
],
wx_cv_func_gettimeofday_has_2_args=no,
- wx_cv_func_gettimeofday_has_2_args=unknown
+ [
+ AC_MSG_WARN([failed to determine number of gettimeofday() arguments])
+ wx_cv_func_gettimeofday_has_2_args=unknown
+ ]
)
)
AC_LANG_RESTORE
if test "$USE_WIN32" = 1; then
if test "$wxUSE_MS_HTML_HELP" = "yes"; then
- AC_DEFINE(wxUSE_MS_HTML_HELP)
AC_CHECK_HEADER(htmlhelp.h,
[
AC_DEFINE(wxUSE_MS_HTML_HELP)
],
[
- AC_MSG_WARN(MS HTML Help cannot be used without htmlhelp.h so it won't be compiled without it)
+ AC_MSG_WARN([MS HTML Help cannot be used without htmlhelp.h, disabled])
wxUSE_MS_HTML_HELP=no
])
fi
dnl IPC: IPC, Drag'n'Drop, Clipboard, ...
dnl ---------------------------------------------------------------------------
+dnl check for ole headers and disable a few features requiring it if not
+dnl present (earlier versions of mingw32 don't have ole2.h)
+if test "$USE_WIN32" = 1; then
+ AC_CHECK_HEADERS(ole2.h)
+
+ if test "$ac_cv_header_ole2_h" = "yes" ; then
+ if test "$GCC" = yes ; then
+ ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
+ ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)"
+ CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
+ LIBS="$LIBS -lrpcrt4 -loleaut32 -lole32 -luuid"
+ AC_DEFINE(wxUSE_OLE)
+
+ fi
+
+ dnl for OLE clipboard and dnd
+ AC_DEFINE(wxUSE_DATAOBJ)
+ else
+ AC_MSG_WARN([Some features disabled because OLE headers not found])
+
+ wxUSE_CLIPBOARD=no
+ wxUSE_DRAG_AND_DROP=no
+ wxUSE_DATAOBJ=no
+ fi
+
+ dnl this is for MSW only, so we test for it inside "if USE_WIN32"
+ if test "$wxUSE_METAFILE" = "yes"; then
+ AC_DEFINE(wxUSE_METAFILE)
+
+ dnl this one should probably be made separately configurable
+ AC_DEFINE(wxUSE_ENH_METAFILE)
+ fi
+fi
+
if test "$wxUSE_IPC" = "yes"; then
if test "$wxUSE_SOCKETS" != "yes"; then
AC_MSG_WARN(wxWindows IPC classes require sockets, disabled)
if test "$wxUSE_CLIPBOARD" = "yes"; then
AC_DEFINE(wxUSE_CLIPBOARD)
+
+ dnl required by clipboard code in configuration check
AC_DEFINE(wxUSE_DATAOBJ)
fi
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)
-
- AC_CHECK_HEADERS(ole2.h)
-
- if test "$ac_cv_header_ole2_h" = "yes" ; then
- if test "$GCC" = yes ; then
- ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)"
- ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)"
- CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks"
- LIBS="$LIBS -lole32 -luuid"
- AC_DEFINE(wxUSE_OLE)
-
- dnl metafiles need the ole code, right?? if not this
- dnl doesn't need to be in here.
- if test "$wxUSE_METAFILE" = "yes"; then
- AC_DEFINE(wxUSE_METAFILE)
- dnl this one should probably be made separately configurable
- AC_DEFINE(wxUSE_ENH_METAFILE)
- fi
- fi
- else
- AC_MSG_WARN(Drag and drop disabled because OLE headers not found)
- wxUSE_DRAG_AND_DROP=no
- fi
- fi
-
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
AC_DEFINE(wxUSE_DRAG_AND_DROP)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
fi
fi
+if test "$wxUSE_SPLASH" = "yes"; then
+ AC_DEFINE(wxUSE_SPLASH)
+fi
+
if test "$wxUSE_STARTUP_TIPS" = "yes"; then
if test "$wxUSE_CONSTRAINTS" != "yes"; then
AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them)
AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
+dnl ---------------------------------------------------------------------------
+dnl define the variable containing the installation prefix (used in dcpsg.cpp)
+dnl ---------------------------------------------------------------------------
+
+if test "x$prefix" != "xNONE"; then
+ wxPREFIX=$prefix
+else
+ wxPREFIX=$ac_default_prefix
+fi
+
+AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX")
+
dnl ---------------------------------------------------------------------------
dnl Output the makefiles and such from the results found above
dnl ---------------------------------------------------------------------------
AC_SUBST(EXTRADEFS)
AC_SUBST(LIBS)
AC_SUBST(LD_LIBS)
+AC_SUBST(WXMSW_DLL_DEFINES)
dnl additional resurces settings
AC_SUBST(RCINPUTSWITCH)