]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Follow up for changes in wxWindows to various event classes
[wxWidgets.git] / configure.in
index 419be3c0b66b72a2f1c696becb3814284388d0e6..c76a98080559c707fd15e4df8057883a6e3af214 100644 (file)
@@ -559,6 +559,60 @@ dnl   defines YYTEXT_POINTER  if yytext is char*
 dnl   defines LEX_OUTPUT_ROOT as to the base of the 
 dnl                           filename output by the lexer
 
+dnl ###################################
+dnl ##  Check for dynamic load module #
+dnl ###################################
+
+DL_LIBRARY=
+AC_CHECK_FUNCS(dlopen, AC_DEFINE(HAVE_LIBDL),
+[AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL) DL_LIBRARY="-ldl"],
+ [AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD) DL_LIBRARY="-ldld"],
+   [AC_CHECK_FUNCS(shl_load, AC_DEFINE(HAVE_SHL_LOAD) )]
+  )]
+ )]
+)
+AC_SUBST(DL_LIBRARY)
+
+AC_CACHE_CHECK([for underscore before symbols], libltdl_cv_uscore, [
+  echo "main(){int i=1;} fnord(){int i=23; int ltuae=42;}" > conftest.c
+  ${CC} -c conftest.c > /dev/null
+  if (nm conftest.o | grep _fnord) > /dev/null; then
+    libltdl_cv_uscore=yes
+  else
+    libltdl_cv_uscore=no
+  fi
+  rm -f conftest*
+])
+
+if test x"$libltdl_cv_uscore" = xyes; then
+  if test x"$ac_cv_func_dlopen" = xyes ||
+     test x"$ac_cv_lib_dl_dlopen" = xyes ; then
+       AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+               libltdl_cv_need_uscore, [dnl
+               AC_TRY_RUN([
+#include <dlfcn.h>
+#include <stdio.h>
+fnord() { int i=42;}
+main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY);
+    if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
+    if(ptr1 && !ptr2) exit(0); } exit(1); } 
+],     libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
+       libltdl_cv_need_uscore=no
+)])
+  fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+   AC_DEFINE(NEED_USCORE)
+fi
+
+dnl ##########################################
+dnl ##  Check for specific library functions #
+dnl ##########################################
+
+dnl Checks for library functions.
+AC_CHECK_FUNCS(strerror)
+
 dnl ------------------------------------------------------------------------
 dnl main includes
 dnl ------------------------------------------------------------------------
@@ -695,6 +749,7 @@ DEFAULT_wxUSE_IOSTREAMH=1
 
 DEFAULT_wxUSE_ZLIB=1
 DEFAULT_wxUSE_LIBPNG=1
+DEFAULT_wxUSE_LIBJPEG=0
 DEFAULT_wxUSE_ODBC=1
 
 DEFAULT_wxUSE_TIMEDATE=1
@@ -710,6 +765,7 @@ DEFAULT_wxUSE_POSTSCRIPT=1
 DEFAULT_wxUSE_IPC=1
 DEFAULT_wxUSE_RESOURCES=1
 DEFAULT_wxUSE_CLIPBOARD=1
+DEFAULT_wxUSE_TOOLTIPS=1
 DEFAULT_wxUSE_DRAG_AND_DROP=1
 
 DEFAULT_wxUSE_MDI_ARCHITECTURE=1
@@ -796,6 +852,10 @@ AC_OVERRIDES(libpng,libpng,
 **--with-libpng           use libpng (PNG image format),
 wxUSE_LIBPNG)
 
+AC_OVERRIDES(libjpeg,libjpeg,
+**--with-libjpeg          use libjpeg (JPEG image format),
+wxUSE_LIBJPEG)
+
 AC_OVERRIDES(odbc,odbc,
 **--with-odbc             use iODBC and wxODBC classes,
 wxUSE_ODBC)
@@ -884,6 +944,10 @@ AC_OVERRIDES(clipboard,clipboard,
 **--with-clipboard        use wxClipboard classes,
 wxUSE_CLIPBOARD)
 
+AC_OVERRIDES(tooltips,tooltips,
+**--with-tooltips         use tooltips,
+wxUSE_TOOLTIPS)
+
 AC_OVERRIDES(dnd,dnd,
 **--with-dnd              use Drag'n'Drop classes,
 wxUSE_DRAG_AND_DROP)
@@ -916,6 +980,13 @@ if test "$wxUSE_UNIX" = 1 ; then
   AC_DEFINE(__UNIX__)
 fi
 
+dnl ----------------------------------------------------------------
+dnl Linux: test for libc5/glibc2: glibc2 has gettext() included
+dnl ----------------------------------------------------------------
+if test "$USE_LINUX" = 1; then
+       AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2))
+fi
+
 dnl ----------------------------------------------------------------
 dnl search for toolkit (widget sets)
 dnl ----------------------------------------------------------------
@@ -1006,11 +1077,11 @@ if test "$wxUSE_MOTIF" = 1; then
      AC_MSG_ERROR(no)
   fi
   
-  GUI_TK_LINK="-lXm -lXmu -lXt -lXpm -lX11 -lm"
-  GUI_TK_LINK="$CHECK_LINK $GUI_TK_LINK"
+  GUI_TK_LINK="-lXm -lXpm -lXmu -lXt -lX11 -lm"
+  GUI_TK_LIBRARY="$CHECK_LIB $GUI_TK_LINK"
   TOOLKIT=MOTIF
   TOOLKIT_DEF="__WXMOTIF__ -D__LINUX__ -D__UNIX__"
-  WX_LINK=-lwx_motif
+  WX_LINK=-lwx_motif2
   MAKEINCLUDE=../motif.inc
 fi
 
@@ -1033,6 +1104,8 @@ dnl ----------------------------------------------------------------
 dnl Register compile options for makefiles and setup.h
 dnl ----------------------------------------------------------------
 
+EXTRA_LINK=
+
 WXDEBUG=
 if test "$wxUSE_DEBUG_GDB" = 1 ; then
   wxUSE_DEBUG_INFO=1
@@ -1043,7 +1116,7 @@ else
     WXDEBUG="-g"
     wxUSE_OPTIMISE=0
   else
-    WX_LINK="-s $WX_LINK"
+    EXTRA_LINK="-s $EXTRA_LINK"
   fi
 fi
 AC_SUBST(WXDEBUG)
@@ -1062,7 +1135,6 @@ if test "$wxUSE_MEM_TRACING" = 1 ; then
   AC_DEFINE_UNQUOTED(wxUSE_GLOBAL_MEMORY_OPERATORS,$wxUSE_MEM_TRACING)
 fi
 
-EXTRA_LINK=
 if test "$wxUSE_DMALLOC" = 1 ; then
   EXTRA_LINK="$EXTRA_LINK -ldmalloc"
 fi
@@ -1117,6 +1189,14 @@ 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_HAVE_LIBRARY(jpeg) 
+  JPEG_LINK="-ljpeg"
+fi
+AC_SUBST(JPEG_LINK)
+
 IODBC_C_SRC=""
 if test "$wxUSE_ODBC" = 1 ; then
   AC_DEFINE_UNQUOTED(wxUSE_ODBC,$wxUSE_ODBC) 
@@ -1220,6 +1300,10 @@ if test "$wxUSE_CLIPBOARD" = 1 ; then
   AC_DEFINE_UNQUOTED(wxUSE_CLIPBOARD,$wxUSE_CLIPBOARD)
 fi
 
+if test "$wxUSE_TOOLTIPS" = 1 ; then
+  AC_DEFINE_UNQUOTED(wxUSE_TOOLTIPS,$wxUSE_TOOLTIPS)
+fi
+
 if test "$wxUSE_DRAG_AND_DROP" = 1 ; then
   AC_DEFINE_UNQUOTED(wxUSE_DRAG_AND_DROP,$wxUSE_DRAG_AND_DROP)
 fi
@@ -1235,13 +1319,6 @@ if test "$wxUSE_HELP" = 1 ; then
 fi
 AC_SUBST(HELP)
 
-dnl ----------------------------------------------------------------
-dnl select  dynamic loader (used by iODBC to load drivers)
-dnl ----------------------------------------------------------------
-
-AC_CHECK_LIB(dl,main,[DL_LIBRARY=-ldl],[DL_LIBRARY=])
-AC_SUBST(DL_LIBRARY)
-
 dnl ----------------------------------------------------------------
 dnl thread support
 dnl ----------------------------------------------------------------
@@ -1397,7 +1474,7 @@ case "${canonical}" in
 esac
 
 if test "x$GCC" = xyes; then
-  CFLAGS="${CFLAGS} -Wall -Wno-unused -Wno-uninitialized -D_REENTRANT -DLEX_SCANNER"
+  CFLAGS="${CFLAGS} -Wall -Wno-unused -Wno-uninitialized -D_REENTRANT -DLEX_SCANNER -DHAVE_LIBDL"
 fi
 
 if test "x$GXX" = xyes; then