X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb4e5803ed1986a365218a7186e6090b1bdae083..1e6d94998fcbdb3ce60774e38c0d4b6ee20c6798:/configure.in diff --git a/configure.in b/configure.in index d2bd41d19c..ed5e745cc9 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Top-level configure.in for wxWindows by Robert Roebling, Wolfram Gloger dnl and Martin Sperl. dnl dnl This script is under the wxWindows licence. -dnl +dnl $Id$ dnl //////////////////////////////////////////////////////////////////////// dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) @@ -240,6 +240,10 @@ SEARCH_INCLUDE="\ /usr/X11R5/include \ /usr/X11R4/include \ \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ @@ -269,6 +273,8 @@ SEARCH_INCLUDE="\ /usr/lpp/Xamples/include \ \ /usr/local/include/gtk \ + /usr/local/include/Xm \ + /usr/local/include/qt \ /usr/X11R6/include/Xm \ /usr/X11/include/Xm \ /usr/include/qt \ @@ -431,6 +437,20 @@ if test "$ac_cv_header_linux_joystick_h" = "yes"; then fi AC_SUBST(GTK_JOYSTICK) +dnl check for vprintf/vsprintf() which are GNU extensions +AC_FUNC_VPRINTF +dnl check for vsnprintf() which is another GNU extension +AC_CHECK_FUNC(vsnprintf) + +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +AC_CHECK_HEADERS(iostream) +if test "x$HAVE_IOSTREAM" = "x" ; then + AC_DEFINE(wxUSE_IOSTREAMH) +fi +AC_LANG_RESTORE + +dnl defines HAVE_IOSTREAM dnl ################### dnl # checks typedefs # dnl ################### @@ -571,6 +591,7 @@ USE_VMS= USE_ULTRIX= USE_DATA_GENERAL= +AC_DEFINE(__UNIX__) case "${canonical}" in *-hp-hpux* ) USE_HPUX=1 @@ -579,6 +600,12 @@ case "${canonical}" in *-*-linux* ) USE_LINUX=1 AC_DEFINE(__LINUX__) + TMP=`uname -m` + if test "x$TMP" = "xalpha" + then + USE_ALPHA=1 + AC_DEFINE(__ALPHA__) + fi ;; *-*-irix5* | *-*-irix6* ) USE_SGI=1 @@ -661,9 +688,8 @@ DEFAULT_wxUSE_APPLE_IEEE=1 DEFAULT_wxUSE_IOSTREAMH=1 DEFAULT_wxUSE_ZLIB=1 -DEFAULT_wxUSE_GDK_IMLIB=1 DEFAULT_wxUSE_LIBPNG=1 -DEFAULT_wxUSE_ODBC=1 +DEFAULT_wxUSE_ODBC=0 DEFAULT_wxUSE_COMBOBOX=1 DEFAULT_wxUSE_GAUGE=1 @@ -691,7 +717,7 @@ DEFAULT_wxUSE_POSTSCRIPT=1 DEFAULT_wxUSE_IPC=1 DEFAULT_wxUSE_RESOURCES=1 DEFAULT_wxUSE_CONSTRAINTS=1 -DEFAULT_wxUSE_CLIPBOARD=0 +DEFAULT_wxUSE_CLIPBOARD=1 DEFAULT_wxUSE_DND=1 DEFAULT_wxUSE_MDI_ARCHITECTURE=1 @@ -706,7 +732,7 @@ DEFAULT_wxUSE_OPENGL=0 DEFAULT_wxUSE_METAFILE=0 DEFAULT_wxUSE_WXGRAPH=0 DEFAULT_wxUSE_WXTREE=0 -DEFAULT_wxUSE_HELP=0 +DEFAULT_wxUSE_HELP=1 DEFAULT_wxUSE_UNICODE=1 DEFAULT_wxUSE_WCSRTOMBS=0 @@ -747,6 +773,10 @@ AC_OVERRIDES(debug_info,debug_info, **--with-debug_info create code with debuging information, wxUSE_DEBUG_INFO) +AC_OVERRIDES(debug_gdb,debug_gdb, +**--with-debug_gdb create code with extra GDB debuging information, +wxUSE_DEBUG_GDB) + AC_OVERRIDES(mem_tracing,mem_tracing, **--with-mem_traing create code with memory tracing, wxUSE_MEM_TRACING) @@ -771,10 +801,6 @@ AC_OVERRIDES(zlib,zlib, **--with-zlib use zlib for LZW comression, wxUSE_ZLIB) -AC_OVERRIDES(gdk_imlib,gdk_imlib, -**--with-gdk_imlib use Raster's gdk_imlib (Image library), -wxUSE_GDK_IMLIB) - AC_OVERRIDES(libpng,libpng, **--with-libpng use libpng (PNG image format), wxUSE_LIBPNG) @@ -947,25 +973,25 @@ AC_OVERRIDES(printarch,printarch, **--with-printarch use printing architecture, wxUSE_PRINTING_ARCHITECTURE) +AC_OVERRIDES(help,help, +**--with-help use help (using external browser at present), +wxUSE_HELP) + dnl ---------------------------------------------------------------- dnl user options with no effect yet dnl ---------------------------------------------------------------- dnl dnl AC_OVERRIDES(metafile, metafile, dnl **--with-metafile use metafile (no effect), -dnl wxwxUSE_METAFILE) -dnl -dnl AC_OVERRIDES(help,help, -dnl **--with-help use help (no effect), -dnl wxwxUSE_HELP) +dnl wxUSE_METAFILE) dnl dnl AC_OVERRIDES(wxgraph,wxgraph, dnl **--with-wxgraph use wxgraph (no effect), -dnl wxwxUSE_WXGRAPH) +dnl wxUSE_WXGRAPH) dnl dnl AC_OVERRIDES(wxtree,wxtree, dnl **--with-wxtree use wxtree (no effect), -dnl wxwxUSE_WXTREE) +dnl wxUSE_WXTREE) dnl dnl AC_OVERRIDES(package,message,helpmessage,variable) dnl @@ -988,15 +1014,18 @@ GUI_TK_INCLUDE= GUI_TK_LIBRARY= GUI_TK_LINK= +WX_LINK= + MAKEINCLUDE= if test "$wxUSE_GTK" = 1; then - AM_PATH_GTK(0.99.7, [ + AM_PATH_GTK(1.0.4, [ GUI_TK_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" - ], AC_MSG_ERROR(Are gtk-config and the GTK in path and up-to-date?)) + ], AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.0.4?)) TOOLKIT=GTK TOOLKIT_DEF=__WXGTK__ + WX_LINK=-lwx_gtk_1_0 MAKEINCLUDE=../gtk.inc fi @@ -1019,9 +1048,10 @@ if test "$wxUSE_QT" = 1; then else AC_MSG_ERROR(no) fi - GUI_TK_LINK="-lXext -lX11 -lqt -lm" + GUI_TK_LINK="-lX11 -lqt -lm" TOOLKIT=QT TOOLKIT_DEF=__WXQT__ + WX_LINK=-lwx_qt MAKEINCLUDE=../qt.inc fi @@ -1030,23 +1060,44 @@ if test "$wxUSE_MOTIF" = 1; then AC_PATH_FIND_INCLUDES($SEARCH_INCLUDE,Xm.h) if test "$ac_find_includes" != "" ; then AC_MSG_RESULT(found $ac_find_includes) - AC_MSG_CHECKING(for Motif or Lesstif library) + AC_MSG_CHECKING(for Motif/Lesstif library) AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xm) if test "$ac_find_libraries" != "" ; then AC_INCLUDE_PATH_EXIST($ac_find_includes,$CHECK_INCLUDE) AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) - CHECK_LINK="$CHECK_INCLUDE $ac_path_to_link" + CHECK_LINK="$CHECK_LIB $ac_path_to_link" CHECK_INCLUDE="$CHECK_INCLUDE $ac_path_to_include" AC_MSG_RESULT(found at $ac_find_libraries) + AC_MSG_CHECKING(for Xt library) + AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt) + if test "$ac_find_libraries" != "" ; then + AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) + CHECK_LINK="$CHECK_LIB $ac_path_to_link" + AC_MSG_RESULT(found at $ac_find_libraries) + AC_MSG_CHECKING(for Xpm library) + AC_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm) + if test "$ac_find_libraries" != "" ; then + AC_LINK_PATH_EXIST($ac_find_libraries,$CHECK_LIB) + CHECK_LINK="$CHECK_LIB $ac_path_to_link" + AC_MSG_RESULT(found at $ac_find_libraries) + else + AC_MSG_ERROR(no) + fi + else + AC_MSG_ERROR(no) + fi else AC_MSG_ERROR(no) fi else AC_MSG_ERROR(no) fi - GUI_TK_LINK="-lXext -lXt -lX11 -lXm -lm" + + GUI_TK_LINK="-lXm -lXmu -lXt -lXpm -lX11 -lm" + GUI_TK_LINK="$CHECK_LINK $GUI_TK_LINK" TOOLKIT=MOTIF - TOOLKIT_DEF=__WXMOTIF__ + TOOLKIT_DEF="__WXMOTIF__ -D__LINUX__ -D__UNIX__" + WX_LINK=-lwx_motif MAKEINCLUDE=../motif.inc fi @@ -1058,6 +1109,8 @@ AC_SUBST(GUI_TK_INCLUDE) AC_SUBST(GUI_TK_LIBRARY) AC_SUBST(GUI_TK_LINK) +AC_SUBST(WX_LINK) + AC_SUBST(TOOLKIT) AC_SUBST(TOOLKIT_DEF) @@ -1068,8 +1121,15 @@ dnl Register compile options for makefiles and setup.h dnl ---------------------------------------------------------------- WXDEBUG= -if test "$wxUSE_DEBUG_INFO" = 1 ; then - WXDEBUG="-g -O0" +if test "$wxUSE_DEBUG_GDB" = 1 ; then + wxUSE_DEBUG_INFO=1 + WXDEBUG="-ggdb" + wxUSE_OPTIMISE=0 +else + if test "$wxUSE_DEBUG_INFO" = 1 ; then + WXDEBUG="-g" + wxUSE_OPTIMISE=0 + fi fi AC_SUBST(WXDEBUG) @@ -1077,6 +1137,9 @@ if test "$wxUSE_DEBUG_FLAG" = 1 ; then AC_DEFINE_UNQUOTED(WXDEBUG,$wxUSE_DEBUG_FLAG) WXDEBUG_DEFINE="-D__WXDEBUG__" AC_SUBST(WXDEBUG_DEFINE) +else + WXDEBUG_DEFINE="-DGTK_NO_CHECK_CASTS" + AC_SUBST(WXDEBUG_DEFINE) fi if test "$wxUSE_MEM_TRACING" = 1 ; then @@ -1131,17 +1194,16 @@ if test "$wxUSE_ZLIB" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_ZLIB,$wxUSE_ZLIB) fi -if test "$wxUSE_GDK_IMLIB" = 1 ; then - AC_DEFINE_UNQUOTED(wxUSE_GDK_IMLIB,$wxUSE_GDK_IMLIB) -fi - if test "$wxUSE_LIBPNG" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_LIBPNG,$wxUSE_LIBPNG) fi +IODBC_C_SRC="" if test "$wxUSE_ODBC" = 1 ; then AC_DEFINE_UNQUOTED(wxUSE_ODBC,$wxUSE_ODBC) + IODBC_C_SRC="\$(IODBC_C_SRC)" fi +AC_SUBST(IODBC_C_SRC) dnl ---------------------------------------------------------------- dnl Register GUI-control options for makefiles and setup.h @@ -1347,19 +1409,19 @@ dnl ---------------------------------------------------------------- dnl thread support dnl ---------------------------------------------------------------- -wxwxUSE_THREADS=1 +wxUSE_THREADS=1 THREADS_LINK="" UNIX_THREAD="gtk/threadno.cpp" AC_OVERRIDES(threads,threads, **--without-threads Force disabling threads, -wxwxUSE_THREADS) +wxUSE_THREADS) dnl AC_ARG_WITH(threads, dnl [**--without-threads Force disabling threads ], -dnl [wxwxUSE_THREADS="$withval"]) +dnl [wxUSE_THREADS="$withval"]) -if test "$wxwxUSE_THREADS" = "1"; then +if test "$wxUSE_THREADS" = "1"; then UNIX_THREAD="gtk/threadno.cpp" dnl For glibc 2 users who have the old libc 5 too @@ -1386,17 +1448,21 @@ if test "$wxwxUSE_THREADS" = "1"; then ]) fi +if test "$wxUSE_MOTIF" = "1"; then + UNIX_THREAD="motif/thread.cpp" +fi + if test -z "$UNIX_THREAD"; then - wxwxUSE_THREADS=0 + wxUSE_THREADS=0 fi AC_SUBST(UNIX_THREAD) AC_SUBST(THREADS_LINK) -AC_DEFINE(wxwxUSE_THREADS) +AC_DEFINE(wxUSE_THREADS) dnl defines UNIX_THREAD it contains the source file to use for threads. (GL) dnl defines THREADS_LINK it contains the thread library to link with. (GL) -dnl defines wxwxUSE_THREADS if thread support is activated. (GL) +dnl defines wxUSE_THREADS if thread support is activated. (GL) dnl ---------------------------------------------------------------- dnl search for opengl @@ -1472,7 +1538,7 @@ CREATE_SHARED= case "${canonical}" in *-hp-hpux* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then CXXFLAGS="${CXXFLAGS} +a1 -z -Aa -D_HPUX_SOURCE" CFLAGS="${CFLAGS} -z -D_HPUX_SOURCE" PICFLAGS="+z" @@ -1496,7 +1562,7 @@ case "${canonical}" in ;; *-*-solaris2* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then PICFLAGS="-KPIC" else PICFLAGS="-fPIC" @@ -1506,7 +1572,7 @@ case "${canonical}" in ;; *-*-sunos4* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then PICFLAGS="-PIC" else PICFLAGS="-fPIC" @@ -1528,7 +1594,7 @@ case "${canonical}" in ;; *-*-dgux5* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then PICFLAGS="-K PIC" else PICFLAGS="-fPIC" @@ -1538,7 +1604,7 @@ case "${canonical}" in ;; *-*-sysv5* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then PICFLAGS="-K PIC" else PICFLAGS="-fPIC" @@ -1548,7 +1614,7 @@ case "${canonical}" in ;; *-*-aix* ) - if test "${CC}" != "gcc" ; then + if test "$GCC" != "yes" ; then PICFLAGS="-bM\:SRE" else PICFLAGS="-fPIC" @@ -1567,7 +1633,11 @@ if test "x$GCC" = xyes; then fi if test "x$GXX" = xyes; then - CXXFLAGS="${CXXFLAGS} -Wall" + if test "$wxUSE_MOTIF" = 1; then + CXXFLAGS="${CXXFLAGS} -Wall -Wno-unused" + else + CXXFLAGS="${CXXFLAGS} -Wall" + fi fi if test "$wxUSE_SHARED" != 1; then