X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6442ad7f4843a16ed80149b00231e9fc70d07c9a..a4fe6524851ebeed1f6d24e8e3fa53b706479ff6:/configure.in diff --git a/configure.in b/configure.in index 86a2517aaf..cd51d6aeb4 100644 --- a/configure.in +++ b/configure.in @@ -7,6 +7,7 @@ dnl This script is under the wxWindows licence. dnl $Id$ dnl //////////////////////////////////////////////////////////////////////// + dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl @@ -61,7 +62,7 @@ main () exit(1); } - if (gtk_minor_version > 0) return FALSE; + if (gtk_minor_version == 1) return FALSE; return !((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || @@ -442,6 +443,10 @@ AC_CHECK_HEADERS(sys/time.h) dnl defines HAVE_SYS_TIME_H AC_CHECK_HEADERS(unistd.h) dnl defines HAVE_UNISTD_H +AC_CHECK_HEADERS(wchar.h) +dnl defines HAVE_WCHAR_H +AC_CHECK_HEADERS(wcstr.h) +dnl defines HAVE_WCSTR_H AC_CHECK_HEADERS(fnmatch.h) dnl defines HAVE_FNMATCH_H dnl As it needs Linux 2.1.x for the moment: check whether the file exists (GL). @@ -459,6 +464,13 @@ dnl ####################### dnl # check for functions # dnl ####################### +WCHAR_LINK= +dnl check for wcslen +AC_CHECK_LIB(c,wcslen,, + AC_CHECK_LIB(w,wcslen, + WCHAR_LINK="-lw" ,AC_MSG_ERROR("Cannot find wcslen function."))) +AC_SUBST(WCHAR_LINK) + dnl check for vprintf/vsprintf() which are GNU extensions AC_FUNC_VPRINTF @@ -836,14 +848,14 @@ DEFAULT_wxUSE_IOSTREAMH=1 DEFAULT_wxUSE_ZLIB=1 DEFAULT_wxUSE_LIBPNG=1 -DEFAULT_wxUSE_LIBJPEG=0 +DEFAULT_wxUSE_LIBJPEG=1 DEFAULT_wxUSE_ODBC=1 DEFAULT_wxUSE_TIMEDATE=1 DEFAULT_wxUSE_INTL=1 DEFAULT_wxUSE_CONFIG=1 DEFAULT_wxUSE_STREAMS=1 -DEFAULT_wxUSE_SOCKETS=1 +DEFAULT_wxUSE_SOCKETS=0 DEFAULT_wxUSE_SERIAL=1 DEFAULT_wxUSE_DYNLIB_CLASS=1 @@ -866,7 +878,7 @@ DEFAULT_wxUSE_WX_RESOURCES=1 DEFAULT_wxUSE_RPC=0 DEFAULT_wxUSE_HELP=1 -DEFAULT_wxUSE_UNICODE=1 +DEFAULT_wxUSE_UNICODE=0 DEFAULT_wxUSE_WCSRTOMBS=0 dnl ---------------------------------------------------------------- @@ -938,15 +950,15 @@ dnl user options for libraries dnl ---------------------------------------------------------------- AC_OVERRIDES(zlib,zlib, -**--with-zlib use zlib for LZW comression, +**--without-zlib don't use zlib for LZW comression, wxUSE_ZLIB) AC_OVERRIDES(libpng,libpng, -**--with-libpng use libpng (PNG image format), +**--without-libpng don't use libpng (PNG image format), wxUSE_LIBPNG) AC_OVERRIDES(libjpeg,libjpeg, -**--with-libjpeg use libjpeg (JPEG image format), +**--without-libjpeg don't use libjpeg (JPEG image format), wxUSE_LIBJPEG) AC_OVERRIDES(odbc,odbc, @@ -1099,15 +1111,20 @@ WX_LINK= MAKEINCLUDE= +WXGTK12= + if test "$wxUSE_GTK" = 1; then - AM_PATH_GTK(1.0.4, [ + AM_PATH_GTK(1.0.0, [ GUI_TK_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" - ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4 up-to 1.0.6?)) + ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?)) TOOLKIT=GTK TOOLKIT_DEF=__WXGTK__ WX_LINK=-lwx_gtk2 MAKEINCLUDE=../gtk.inc + AM_PATH_GTK(1.2.0, [ + WXGTK12=1 + ], AC_MSG_RESULT(no)) fi if test "$wxUSE_QT" = 1; then @@ -1212,6 +1229,10 @@ dnl ---------------------------------------------------------------- dnl Register compile options for makefiles and setup.h dnl ---------------------------------------------------------------- +if test "$WXGTK12" = 1 ; then + AC_DEFINE_UNQUOTED(__WXGTK12__,$WXGTK12) +fi + EXTRA_LINK= WXDEBUG= @@ -1295,12 +1316,18 @@ if test "$wxUSE_LIBPNG" = 1 ; then fi AC_SUBST(PNG_C_SRC) -JPEG_LINK="" if test "$wxUSE_LIBJPEG" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_LIBJPEG,$wxUSE_LIBJPEG) - AC_CHECK_LIB(jpeg,main,,AC_MSG_ERROR("libjpeg is not available.")) - JPEG_LINK="-ljpeg" + JPEG_C_SRC="\$(JPEG_C_SRC)" fi +AC_SUBST(JPEG_C_SRC) + +JPEG_LINK="" +dnl if test "$wxUSE_LIBJPEG" = 1 ; then +dnl AC_DEFINE_UNQUOTED(wxUSE_LIBJPEG,$wxUSE_LIBJPEG) +dnl AC_CHECK_LIB(jpeg,main,,AC_MSG_ERROR("libjpeg is not available.")) +dnl JPEG_LINK="-ljpeg" +dnl fi AC_SUBST(JPEG_LINK) IODBC_C_SRC="" @@ -1343,19 +1370,27 @@ dnl wxSocket dnl ------------------------------------------------------------------------ if test "$wxUSE_SOCKETS" = "1"; then + AC_LANG_SAVE + AC_LANG_CPLUSPLUS dnl determine the type of third argument for getsockname AC_MSG_CHECKING(the type of the third argument of getsockname) AC_TRY_COMPILE( [#include ], - [size_t len; getsockname(0, NULL, &len);], - AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t), - AC_TRY_COMPILE( - [#include ], - [int len; getsockname(0, NULL, &len);], - AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int), - AC_MSG_RESULT(unknown) + [socklen_t len; getsockname(0, NULL, &len);], + AC_DEFINE(SOCKLEN_T, socklen_t) AC_MSG_RESULT(socklen_t), + AC_TRY_COMPILE( + [#include ], + [size_t len; getsockname(0, NULL, &len);], + AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t), + AC_TRY_COMPILE( + [#include ], + [int len; getsockname(0, NULL, &len);], + AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int), + AC_MSG_RESULT(unknown) + ) ) ) + AC_LANG_RESTORE fi dnl ------------------------------------------------------------------------ @@ -1465,7 +1500,12 @@ if test "$wxUSE_TOOLTIPS" = 1 ; then fi if test "$wxUSE_DRAG_AND_DROP" = 1 ; then - AC_DEFINE_UNQUOTED(wxUSE_DRAG_AND_DROP,$wxUSE_DRAG_AND_DROP) + if test "$WXGTK12" = 1 ; then + AC_DEFINE_UNQUOTED(wxUSE_DRAG_AND_DROP,$wxUSE_DRAG_AND_DROP) + else + AC_MSG_WARN(drag and drop is only supported under GTK 1.2, sorry) + wxUSE_DRAG_AND_DROP=0 + fi fi dnl ---------------------------------------------------------------- @@ -1493,13 +1533,10 @@ UNIX_THREAD="" if test "$wxUSE_THREADS" = "1"; then dnl find if POSIX threads are available - dnl For glibc 2 users who have the old libc 5 too check pthread-0.7 first - AC_CHECK_LIB(pthread-0.7, pthread_create, [ - UNIX_THREAD="unix/threadpsx.cpp" - THREADS_LINK="pthread-0.7" - ],[ - dnl standard lib name is pthread - AC_CHECK_LIB(pthread, pthread_create, [ + dnl standard lib name is pthread + dnl We no longer test for pthread-0.7 as it breaks compilation on some + dnl glibc2 systems, especially for static linkage. + AC_CHECK_LIB(pthread, pthread_create, [ UNIX_THREAD="unix/threadpsx.cpp" THREADS_LINK="pthread" ], [ @@ -1514,8 +1551,6 @@ if test "$wxUSE_THREADS" = "1"; then ]) ]) ]) - ]) - if test "$THREADS_LINK" != ""; then AC_DEFINE(wxUSE_THREADS) else