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 ------------------------------------------------------------------------
DEFAULT_wxUSE_ZLIB=1
DEFAULT_wxUSE_LIBPNG=1
+DEFAULT_wxUSE_LIBJPEG=0
DEFAULT_wxUSE_ODBC=1
DEFAULT_wxUSE_TIMEDATE=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
**--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)
**--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)
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 ----------------------------------------------------------------
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
dnl Register compile options for makefiles and setup.h
dnl ----------------------------------------------------------------
+EXTRA_LINK=
+
WXDEBUG=
if test "$wxUSE_DEBUG_GDB" = 1 ; then
wxUSE_DEBUG_INFO=1
WXDEBUG="-g"
wxUSE_OPTIMISE=0
else
- WX_LINK="-s $WX_LINK"
+ EXTRA_LINK="-s $EXTRA_LINK"
fi
fi
AC_SUBST(WXDEBUG)
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
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)
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
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 ----------------------------------------------------------------
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