X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e541dae02d21c0cfceee3e71d9ce9951fd6e7438..11a9b49de9f487938312e63645c371d01fff25d0:/configure.in?ds=sidebyside diff --git a/configure.in b/configure.in index fc5c4281a0..18d624fbd9 100644 --- a/configure.in +++ b/configure.in @@ -1444,12 +1444,6 @@ dnl is -traditional needed for correct compilations dnl adds -traditional for gcc if needed AC_PROG_GCC_TRADITIONAL -dnl do all checks from now on using the C++ compiler: this saves us a lot of -dnl problems with various functions which may be available in libc but not -dnl declared in the header and various pointer conversions which compile with -dnl the C compiler but not in C++ -AC_LANG_PUSH(C++) - dnl C++-compiler checks dnl defines CXX with the compiler to use dnl defines GXX with yes if using gxx @@ -1715,7 +1709,6 @@ case "${host}" in dnl not "g++/c++". dnl --------------------------------------------------------------------- dnl (OS/2-only piece) - AC_LANG_PUSH(C) if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then dnl More complete Unix emulation for unix-like ports dnl by linking in POSIX/2's cExt (if available). @@ -1759,7 +1752,6 @@ case "${host}" in wx_cv_gccversion="EMX2" ) ]) - AC_LANG_POP if test "$wx_cv_gccversion" = "EMX2"; then LIBS="$LIBS -lstdcpp" LDFLAGS="$LDFLAGS -Zsysv-signals" @@ -1828,27 +1820,13 @@ dnl ------------------------------------------------------------------------ dnl Check for headers dnl ------------------------------------------------------------------------ -dnl defines HAVE_STDLIB_H -AC_CHECK_HEADERS(stdlib.h) -dnl defines HAVE_MALLOC_H -AC_CHECK_HEADERS(malloc.h) -dnl defines HAVE_UNISTD_H -AC_CHECK_HEADERS(unistd.h) -dnl defines HAVE_WCHAR_H -AC_CHECK_HEADERS(wchar.h) +AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h) dnl maybe wchar_t is in wcstr.h if we don't have wchar.h? if test "$ac_cv_header_wchar_h" != "yes"; then - dnl defines HAVE_WCSTR_H AC_CHECK_HEADERS(wcstr.h) fi -dnl defines HAVE_FNMATCH_H -AC_CHECK_HEADERS(fnmatch.h) - -dnl defines HAVE_LANGINFO_H (GNU libc locale parameters) -AC_CHECK_HEADERS(langinfo.h) - case "${host}" in *-pc-os2_emx | *-pc-os2-emx ) dnl Explicitly link -lintl if langinfo.h is available @@ -2495,9 +2473,9 @@ fi dnl check for C99 string to long long conversion functions, assume that if we dnl have the unsigned variants, then we have the signed ones as well if test "wxUSE_UNICODE" = "yes"; then - AC_CHECK_FUNCS(wcstoull) + WX_CHECK_FUNCS(wcstoull) else - AC_CHECK_FUNCS(strtoull) + WX_CHECK_FUNCS(strtoull) fi dnl --------------------------------------------------------------------------- @@ -2972,8 +2950,6 @@ if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GTK" = 1; then dnl GTK+ test program must be compiled with C compiler - AC_LANG_PUSH(C) - AC_MSG_CHECKING([for GTK+ version]) gtk_version_cached=1 @@ -3137,8 +3113,6 @@ libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM)) fi - AC_LANG_POP - dnl we need poll() in src/gtk/app.cpp (we know that Darwin doesn't dnl have it but we do the check for the others) if test "$USE_DARWIN" != 1; then @@ -4339,6 +4313,8 @@ dnl stupidly, provides a dummy function declaration inside its extension) dnl succeeds, even with C++ compiler, but the compilation of wxWidgets fails dnl dnl so we first check if the function is in the library +dnl +dnl FIXME: replace this mess with WX_CHECK_FUNCS() AC_CHECK_FUNCS(snprintf vsnprintf) if test "$ac_cv_func_vsnprintf" = "yes"; then @@ -4540,8 +4516,21 @@ if test "$wxUSE_UNICODE" = yes; then fi fi - dnl also look if we have wide char IO functions - AC_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf) + dnl also look if we have wide char IO functions, notice that [f]putws are + dnl declared in special widec.h under Solaris + wchar_headers="#include +#include " + case "${host}" in + *-*-solaris2* ) + AC_CHECK_HEADERS(widec.h) + if test "$ac_cv_header_widec_h" = "yes"; then + wchar_headers="$wchar_headers +#include " + fi + esac + + WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,, + [$wchar_headers]) dnl MinGW has a vswprintf with a different prototype, and dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS @@ -4555,18 +4544,14 @@ if test "$wxUSE_UNICODE" = yes; then fi if test "x$ac_cv_header_fnmatch_h" = "xyes"; then - AC_CHECK_FUNCS(fnmatch) + WX_CHECK_FUNCS(fnmatch) fi if test "$wxUSE_FILE" = "yes"; then - AC_CHECK_FUNCS(fsync) -fi - -AC_CHECK_FUNCS(round) -if test "$ac_cv_func_round" = yes; then - AC_CHECK_DECLS(round,,,[#include ]) + WX_CHECK_FUNCS(fsync) fi +WX_CHECK_FUNCS(round,,,[#include ]) dnl the following tests are for Unix(like) systems only if test "$TOOLKIT" != "MSW"; then @@ -4824,9 +4809,8 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then POSIX4_LINK=" -lposix4" ], [ - AC_CHECK_FUNCS(usleep, - AC_DEFINE(HAVE_USLEEP), - AC_MSG_WARN([wxSleep() function will not work]) + WX_CHECK_FUNCS(usleep,, + AC_MSG_WARN([wxSleep() function will not work]) ) ] ) @@ -4835,7 +4819,7 @@ if test "$HAVE_SOME_SLEEP_FUNC" != 1; then fi dnl check for uname (POSIX) and gethostname (BSD) -AC_CHECK_FUNCS(uname gethostname, break) +WX_CHECK_FUNCS(uname gethostname, break) WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT]) @@ -5662,8 +5646,16 @@ if test "$wxUSE_SOUND" = "yes"; then WITH_PLUGIN_SDL=1 fi fi + else + dnl wxMGL doesn't support sound under DOS, only under Unix + if test "$wxUSE_MGL" = 1; then + AC_MSG_WARN([wxSound not supported in MGL under DOS... disabled]) + wxUSE_SOUND="no" + fi fi +fi +if test "$wxUSE_SOUND" = "yes"; then AC_DEFINE(wxUSE_SOUND) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound" fi @@ -6305,7 +6297,10 @@ if test "$wxUSE_GUI" = "yes" -a "$wxUSE_JOYSTICK" = "yes"; then dnl joystick support is only for Linux 2.1.x or greater else - AC_CHECK_HEADERS(linux/joystick.h, wxUSE_JOYSTICK=yes) + dnl wxJoystick not supported by wxMGL at all + if test "$wxUSE_MGL" != "1"; then + AC_CHECK_HEADERS(linux/joystick.h, wxUSE_JOYSTICK=yes) + fi fi if test "$wxUSE_JOYSTICK" = "yes"; then @@ -6896,8 +6891,8 @@ if test "$wxUSE_POPUPWIN" = "yes"; then fi if test "$wxUSE_DIALUP_MANAGER" = "yes"; then - if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then - AC_MSG_WARN([Dialup manager not yet supported under Mac OS X... disabled]) + if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then + AC_MSG_WARN([Dialup manager not supported on this platform... disabled]) else AC_DEFINE(wxUSE_DIALUP_MANAGER) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup" @@ -7317,9 +7312,6 @@ dnl --------------------------------------------------------------------------- dnl Output the makefiles and such from the results found above dnl --------------------------------------------------------------------------- -dnl no more tests from here -AC_LANG_POP - dnl all additional libraries (except wxWidgets itself) we link with if test "$wxUSE_MAC" = 1 ; then @@ -7893,7 +7885,10 @@ AC_CONFIG_FILES([ lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}:wx-config-inplace. [ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ], [ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ]) -AC_CONFIG_FILES([ version-script Makefile ]) +if test "$wx_cv_version_script" = "yes"; then + AC_CONFIG_FILES(version-script) +fi +AC_CONFIG_FILES(Makefile) AC_CONFIG_COMMANDS([wx-config], [ rm -f wx-config @@ -7921,6 +7916,10 @@ fi dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"]) +if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then + DISABLED_CONTRIB="$DISABLED_CONTRIB net" +fi + for subdir in `echo $SUBDIRS`; do if test -d ${srcdir}/${subdir} ; then if test "$wxUSE_GUI" = "yes"; then