]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Added $(NEW_WXLIBNAME) to allow changing the library or DLL name
[wxWidgets.git] / configure.in
index 39f1f339ac18dc225a66d23b180ad96b94cdb4ba..cd51d6aeb475092f69312f8159b4aaa802547d87 100644 (file)
@@ -443,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).
@@ -460,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
 
@@ -844,7 +855,7 @@ 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
 
@@ -1100,6 +1111,8 @@ WX_LINK=
 
 MAKEINCLUDE=
 
+WXGTK12=
+
 if test "$wxUSE_GTK" = 1; then
   AM_PATH_GTK(1.0.0, [
        GUI_TK_INCLUDE="$GTK_CFLAGS"
@@ -1109,6 +1122,9 @@ if test "$wxUSE_GTK" = 1; then
   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
@@ -1213,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=
@@ -1350,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 <sys/socket.h>],
-        [size_t len; getsockname(0, NULL, &len);],
-        AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t),
-        AC_TRY_COMPILE(
-            [#include <sys/socket.h>],
-            [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 <sys/socket.h>],
+               [size_t len; getsockname(0, NULL, &len);],
+               AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t),
+               AC_TRY_COMPILE(
+                   [#include <sys/socket.h>],
+                   [int len; getsockname(0, NULL, &len);],
+                   AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int),
+                   AC_MSG_RESULT(unknown)
+               )
         )
     )
+    AC_LANG_RESTORE
 fi
 
 dnl ------------------------------------------------------------------------
@@ -1472,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 ----------------------------------------------------------------