]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Added script to help make wxMotif via configure; nativdlg sample works again;
[wxWidgets.git] / configure.in
index 290d717b787c20fb01bd9e3abe0e8273e46b0f11..5ac599ba21367b8ddd1405a844bee8dca022e992 100644 (file)
@@ -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        \
@@ -433,6 +437,11 @@ 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)
@@ -582,6 +591,7 @@ USE_VMS=
 USE_ULTRIX=
 USE_DATA_GENERAL=
 
+AC_DEFINE(__UNIX__)
 case "${canonical}" in
   *-hp-hpux* )
     USE_HPUX=1
@@ -590,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
@@ -655,7 +671,7 @@ dnl ------------------------------------------------------------------------
 
 AC_OVERRIDES_PREPARE
 
-DEFAULT_wxUSE_GTK=1
+DEFAULT_wxUSE_GTK=0
 DEFAULT_wxUSE_QT=0
 DEFAULT_wxUSE_MOTIF=0
 
@@ -716,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
@@ -757,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)
@@ -953,6 +973,10 @@ 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 ----------------------------------------------------------------
@@ -961,10 +985,6 @@ dnl AC_OVERRIDES(metafile, metafile,
 dnl **--with-metafile         use metafile (no effect),
 dnl wxUSE_METAFILE)
 dnl
-dnl AC_OVERRIDES(help,help,
-dnl **--with-help             use help (no effect),
-dnl wxUSE_HELP)
-dnl
 dnl AC_OVERRIDES(wxgraph,wxgraph,
 dnl **--with-wxgraph          use wxgraph (no effect),
 dnl wxUSE_WXGRAPH)
@@ -994,6 +1014,8 @@ GUI_TK_INCLUDE=
 GUI_TK_LIBRARY=
 GUI_TK_LINK=
 
+WX_LINK=
+
 MAKEINCLUDE=
 
 if test "$wxUSE_GTK" = 1; then
@@ -1003,6 +1025,7 @@ if test "$wxUSE_GTK" = 1; then
   ], 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
 
@@ -1025,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
 
@@ -1036,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
 
@@ -1064,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)
 
@@ -1074,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)
 
@@ -1579,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