X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a98a85452729f479bad8538738ee899a0b1aa34..b480d851282158791498ebdd7b5ff186fb8ecec3:/configure.in diff --git a/configure.in b/configure.in index 091bad732f..22a7497e6b 100644 --- a/configure.in +++ b/configure.in @@ -9,7 +9,7 @@ dnl dnl This script is under the wxWindows licence. dnl dnl Version: $Id$ -dnl //////////////////////////////////////////////////////////////////////// +dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- dnl initialization @@ -19,18 +19,44 @@ dnl the file passed to AC_INIT should be speicific to our package AC_INIT(wx-config.in) AC_CANONICAL_HOST -AM_INIT_AUTOMAKE(wxWindows, 2.1.0) + +dnl When making releases do: +dnl +dnl WX_RELEASE_NUMBER += 1 +dnl WX_INTERFACE_AGE += 1 +dnl WX_BINARY_AGE += 1 +dnl +dnl if any functions have been added, do: +dnl +dnl WX_INTERFACE_AGE = 1 WX_MAJOR_VERSION_NUMBER=2 WX_MINOR_VERSION_NUMBER=1 WX_RELEASE_NUMBER=0 +WX_INTERFACE_AGE=0 +WX_BINARY_AGE=0 + +WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER + +AM_INIT_AUTOMAKE(wxWindows, $WX_VERSION) + +dnl libtool versioning +LT_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER +LT_CURRENT=`expr $WX_RELEASE_NUMBER - $WX_INTERFACE_AGE` +LT_REVISION=$WX_INTERFACE_AGE +LT_AGE=`expr $WX_BINARY_AGE - $WX_INTERFACE_AGE` +AC_SUBST(LT_RELEASE) +AC_SUBST(LT_CURRENT) +AC_SUBST(LT_REVISION) +AC_SUBST(LT_AGE) + dnl FIXME this hack suppresses automake 1.4 warning about @LTLIBOBJS@ being dnl never defined in configure.in (remove these lines to see what I'm dnl speaking about) - Tom Tromey told me that it will dnl be fixed in the next release. LIBOBJS= -LIBOBJS="$LIBOBJS common/extended.o" +LIBOBJS="$LIBOBJS ../common/extended.o" dnl ------------------------------------------------------------------------ dnl Check platform (host system) @@ -148,6 +174,9 @@ esac if test "$USE_UNIX" = 1 ; then wxUSE_UNIX=yes AC_DEFINE(__UNIX__) + EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix" + SRC_SUBDIRS="$SRC_SUBDIRS unix" + INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" fi dnl Linux: test for libc5/glibc2: glibc2 has gettext() included @@ -252,7 +281,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_NOTEBOOK=no DEFAULT_wxUSE_RADIOBOX=no DEFAULT_wxUSE_RADIOBTN=no - DEFAULT_wxUSE_SASHWINDOW=no + DEFAULT_wxUSE_SASH=no DEFAULT_wxUSE_SCROLLBAR=no DEFAULT_wxUSE_SLIDER=no DEFAULT_wxUSE_SPINBTN=no @@ -341,7 +370,7 @@ else DEFAULT_wxUSE_NOTEBOOK=yes DEFAULT_wxUSE_RADIOBOX=yes DEFAULT_wxUSE_RADIOBTN=yes - DEFAULT_wxUSE_SASHWINDOW=yes + DEFAULT_wxUSE_SASH=yes DEFAULT_wxUSE_SCROLLBAR=yes DEFAULT_wxUSE_SLIDER=yes DEFAULT_wxUSE_SPINBTN=yes @@ -371,13 +400,13 @@ AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=PFX prefix where GTK is in AC_ARG_WITH(gtk-exec-prefix, [ --with-gtk-exec-prefix=PFX exec prefix where GTK is installed], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_WITH(gtk, [ --with-gtk use GTK+], - wxUSE_GTK="$withval",wxUSE_GTK=0) + [wxUSE_GTK="$withval" TOOLKIT_GIVEN=1]) AC_ARG_WITH(motif, [ --with-motif use Motif/Lesstif], - wxUSE_MOTIF="$withval",wxUSE_MOTIF=0) + [wxUSE_MOTIF="$withval" TOOLKIT_GIVEN=1]) AC_ARG_WITH(cygwin, [ --with-cygwin use Cygwin for MS-Windows], - wxUSE_CYGWIN="$withval",wxUSE_CYGWIN=0) + [wxUSE_CYGWIN="$withval" TOOLKIT_GIVEN=1]) AC_ARG_WITH(mingw, [ --with-mingw use GCC Minimal MS-Windows], - wxUSE_MINGW="$withval",wxUSE_MINGW=0) + [wxUSE_MINGW="$withval" TOOLKIT_GIVEN=1]) AC_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (www.letters.com/dmalloc)], wxUSE_DMALLOC="$withval",wxUSE_DMALLOC=$DEFAULT_wxUSE_DMALLOC) @@ -406,6 +435,17 @@ AC_ARG_ENABLE(optimise, [ --enable-optimise create optimised code] wxUSE_OPTIMISE="$enableval",wxUSE_OPTIMISE=$DEFAULT_wxUSE_OPTIMISE) AC_ARG_ENABLE(optimize, [ --enable-optimize create optimized code], wxUSE_OPTIMISE="$enableval",wxUSE_OPTIMISE=$DEFAULT_wxUSE_OPTIMISE) +AC_ARG_ENABLE(debug, [ --enable-debug same as debug_flag and debug_info], + wxUSE_DEBUG="${enableval}",wxUSE_DEBUG=$DEFAULT_wxUSE_DEBUG) + +if test "$wxUSE_DEBUG" = "yes"; then + DEFAULT_wxUSE_DEBUG_FLAG=yes + DEFAULT_wxUSE_DEBUG_INFO=yes +elif test "$wxUSE_DEBUG" = "no"; then + DEFAULT_wxUSE_DEBUG_FLAG=no + DEFAULT_wxUSE_DEBUG_INFO=no +fi + AC_ARG_ENABLE(debug_flag, [ --enable-debug_flag set __WXDEBUG__ flag (recommended for developers!)], wxUSE_DEBUG_FLAG="$enableval",wxUSE_DEBUG_FLAG=$DEFAULT_wxUSE_DEBUG_FLAG) AC_ARG_ENABLE(debug_info, [ --enable-debug_info create code with debugging information], @@ -664,7 +704,19 @@ AC_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived dnl check that no more than one toolkit is given and that if none are given that dnl we have a default one -dnl + +if test "$TOOLKIT_GIVEN" = 1; then + dnl convert "yes" to 1 and "no" to 0 + wxUSE_GTK=`echo $wxUSE_GTK | sed -e 's/yes/1/' -e 's/no/0/'` + wxUSE_MOTIF=`echo $wxUSE_MOTIF | sed -e 's/yes/1/' -e 's/no/0/'` + wxUSE_MSW=`echo $wxUSE_MSW | sed -e 's/yes/1/' -e 's/no/0/'` +else + dnl try to guess the most apropriate toolkit for this platform + wxUSE_GTK=$DEFAULT_wxUSE_GTK + wxUSE_MOTIF=$DEFAULT_wxUSE_MOTIF + wxUSE_MSW=$DEFAULT_wxUSE_MSW +fi + dnl NB: this supposes that the shell is able to handle arithmetic expansion and dnl the ${VAR:-VALUE} construction. It does simplify our life though... NUM_TOOLKITS="$((${wxUSE_GTK:-0}+${wxUSE_MOTIF:-0}+${wxUSE_MSW:-0}))" @@ -673,13 +725,7 @@ case "$NUM_TOOLKITS" in 1) ;; 0) - if test "$((${DEFAULT_wxUSE_GTK:-0}+${DEFAULT_wxUSE_MOTIF:-0}+${DEFAULT_wxUSE_MSW:-0}))" = 0; then - AC_MSG_ERROR(Please specify a toolkit) - fi - - wxUSE_GTK=$DEFAULT_wxUSE_GTK - wxUSE_MOTIF=$DEFAULT_wxUSE_MOTIF - wxUSE_MSW=$DEFAULT_wxUSE_MSW + AC_MSG_ERROR(Please specify a toolkit) ;; *) AC_MSG_ERROR(Please specify at most one toolkit) @@ -750,10 +796,6 @@ dnl install checks dnl defines INSTALL with the appropriate command AC_PROG_INSTALL -dnl does ln -s works -dnl defines LN_S with the appropriate command -AC_PROG_LN_S - dnl strip command dnl defines STRIP as strip or nothing if not found AC_CHECK_PROG(STRIP, strip, strip, true) @@ -805,6 +847,9 @@ dnl defines LEX_OUTPUT_ROOT as to the base of the dnl filename output by the lexer AM_PROG_LEX +dnl needed for making link to setup.h +AC_PROG_LN_S + dnl libtool checks (disable static libs by default, this takes too much time...) AM_DISABLE_STATIC AM_PROG_LIBTOOL @@ -916,9 +961,7 @@ if test "$wxUSE_GTK" = 1; then TOOLKIT_INCLUDE="$GTK_CFLAGS" GUI_TK_LIBRARY="$GTK_LIBS" - TOOLKIT=GTK - LTLIBOBJS="$LTLIBOBJS image.lo utilsgtk.lo win_gtk.lo" fi if test "$wxUSE_MOTIF" = 1; then @@ -970,7 +1013,7 @@ if test "$wxUSE_MOTIF" = 1; then AC_MSG_WARN(library will be compiled without support for images in XPM format) fi - GUI_TK_LINK="-lXm $(XPM_LINK)-lXmu -lXt -lX11 -lm" + GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXt -lX11 -lm" GUI_TK_LIBRARY="$CHECK_LIB $GUI_TK_LINK" TOOLKIT=MOTIF fi @@ -981,8 +1024,11 @@ TOOLKIT_DIR=`echo ${TOOLKIT} | tr "A-Z" "a-z"` dnl the symbol which allows conditional compilation for the given toolkit TOOLKIT_DEF=-D__WX${TOOLKIT}__ -dnl the name (without leading 'wx_') of the library -WX_LIBRARY=${TOOLKIT_DIR}2 +dnl the name of the (libtool) library +WX_LIBRARY_NAME="libwx_${TOOLKIT_DIR}.la" + +dnl the name of the library to be linked reported by wx-config +WX_LIBRARY="wx_${TOOLKIT_DIR}" dnl ------------------------------------------------------------------------ dnl Check for headers @@ -998,6 +1044,8 @@ dnl defines HAVE_WCSTR_H AC_CHECK_HEADERS(wcstr.h) dnl defines HAVE_FNMATCH_H AC_CHECK_HEADERS(fnmatch.h) +dnl defines HAVE_X11_XKBLIB_H +AC_CHECK_HEADERS(X11/XKBlib.h) dnl --------------------------------------------------------------------------- dnl Checks for typedefs @@ -1030,11 +1078,16 @@ AC_C_INLINE dnl check the sizes of integral types (give some reasonable default values for dnl cross-compiling) dnl defines the size of certain types of variables in SIZEOF_ +AC_CHECK_SIZEOF(char, 1) +AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int *, 4) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long long, 0) +dnl for bytesex stuff (don't use AC_C_BIGENDIAN to allow cross-compiling) +WX_C_BIGENDIAN + dnl check for iostream (as opposed to iostream.h) standard header WX_CPP_NEW_HEADERS(, AC_DEFINE(wxUSE_IOSTREAMH)) @@ -1144,8 +1197,7 @@ if test "$wxUSE_THREADS" = "yes"; then CXXFLAGS="${CXXFLAGS} -D_REENTRANT" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" - EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/unix" - LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ" +dnl LTLIBOBJS="$LTLIBOBJS $THREADS_OBJ" dnl define autoconf macro to check for given function in both pthread and dnl posix4 libraries @@ -1268,29 +1320,25 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_ZLIB" = "yes" ; then AC_DEFINE(wxUSE_ZLIB) - EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/zlib" + EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../zlib" LTLIBOBJS="$LTLIBOBJS adler32.lo compress.lo crc32.lo gzio.lo uncompr.lo deflate.lo trees.lo zutil.lo inflate.lo infblock.lo inftrees.lo infcodes.lo infutil.lo inffast.lo" - if eval "test x$wxUSE_STREAMS = x1"; then - LTLIBOBJS="$LTLIBOBJS zstream.lo" - fi fi if test "$wxUSE_LIBPNG" = "yes" ; then AC_DEFINE(wxUSE_LIBPNG) - LTLIBOBJS="$LTLIBOBJS imagpng.lo png.lo pngset.lo pngget.lo pngrutil.lo pngtrans.lo pngwutil.lo pngread.lo pngrio.lo pngwio.lo pngwrite.lo pngrtran.lo pngwtran.lo pngmem.lo pngerror.lo pngpread.lo" - EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/png" + LTLIBOBJS="$LTLIBOBJS png.lo pngset.lo pngget.lo pngrutil.lo pngtrans.lo pngwutil.lo pngread.lo pngrio.lo pngwio.lo pngwrite.lo pngrtran.lo pngwtran.lo pngmem.lo pngerror.lo pngpread.lo" + EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../png" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS png" fi if test "$wxUSE_LIBGIF" = "yes" ; then AC_DEFINE(wxUSE_LIBGIF) - LTLIBOBJS="$LTLIBOBJS imaggif.lo" fi if test "$wxUSE_LIBJPEG" = "yes" ; then AC_DEFINE(wxUSE_LIBJPEG) - EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/jpeg" - LTLIBOBJS="$LTLIBOBJS imagjpeg.lo \ + EXTRA_VPATH="$EXTRA_VPATH:\${srcdir}/../jpeg" + LTLIBOBJS="$LTLIBOBJS \ jcomapi.lo jutils.lo jerror.lo jmemmgr.lo jmemnobs.lo \ jcapimin.lo jcapistd.lo jctrans.lo jcparam.lo jdatadst.lo \ jcinit.lo jcmaster.lo jcmarker.lo jcmainct.lo jcprepct.lo \ @@ -1337,13 +1385,13 @@ if test "$wxUSE_GUI" = "yes"; then dnl need the dcs, pens, brushes, ...), this just can't be done now dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem dnl 5. misc stuff: timers, settings, message box - LTLIBOBJS="$LTLIBOBJS \ -main.lo app.lo event.lo wincmn.lo window.lo control.lo framecmn.lo frame.lo dialog.lo panelg.lo \ -button.lo stattext.lo textctrl.lo \ -bitmap.lo brush.lo colour.lo cursor.lo data.lo dc.lo dcbase.lo dcclient.lo \ -dcmemory.lo dcscreen.lo font.lo gdicmn.lo gdiobj.lo icon.lo palette.lo pen.lo region.lo \ -menu.lo \ -settings.lo timer.lo msgdlgg.lo" + dnl LTLIBOBJS="$LTLIBOBJS \ + dnl main.lo app.lo event.lo wincmn.lo window.lo control.lo framecmn.lo frame.lo dialog.lo panelg.lo \ + dnl button.lo stattext.lo textctrl.lo \ + dnl bitmap.lo brush.lo colour.lo cursor.lo data.lo dc.lo dcbase.lo dcclient.lo \ + dnl dcmemory.lo dcscreen.lo font.lo gdicmn.lo gdiobj.lo icon.lo palette.lo pen.lo region.lo \ + dnl menu.lo \ + dnl settings.lo timer.lo msgdlgg.lo" else AC_DEFINE(wxUSE_NOGUI) fi @@ -1354,7 +1402,6 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_UNIX" = "yes"; then AC_DEFINE(wxUSE_UNIX) - LTLIBOBJS="$LTLIBOBJS utilsunx.lo" fi dnl --------------------------------------------------------------------------- @@ -1363,18 +1410,15 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_APPLE_IEEE" = "yes"; then AC_DEFINE(wxUSE_APPLE_IEEE) - LTLIBOBJS="$LTLIBOBJS extended.lo" fi if test "$wxUSE_TIMEDATE" = "yes"; then AC_DEFINE(wxUSE_TIMEDATE) - LTLIBOBJS="$LTLIBOBJS date.lo time.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS typetest" fi if test "$wxUSE_FILE" = "yes"; then AC_DEFINE(wxUSE_FILE) - LTLIBOBJS="$LTLIBOBJS file.lo" fi if test "$wxUSE_TEXTFILE" = "yes"; then @@ -1382,7 +1426,6 @@ if test "$wxUSE_TEXTFILE" = "yes"; then AC_MSG_WARN(wxTextFile requires wxFile and it won't be compiled without it) else AC_DEFINE(wxUSE_TEXTFILE) - LTLIBOBJS="$LTLIBOBJS textfile.lo" fi fi @@ -1391,7 +1434,6 @@ if test "$wxUSE_CONFIG" = "yes" ; then AC_MSG_WARN(wxConfig requires wxTextFile and it won't be compiled without it) else AC_DEFINE(wxUSE_CONFIG) - LTLIBOBJS="$LTLIBOBJS config.lo fileconf.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS config" fi fi @@ -1401,26 +1443,23 @@ if test "$wxUSE_INTL" = "yes" ; then AC_MSG_WARN(I18n code requires wxFile and it won't be compiled without it) else AC_DEFINE(wxUSE_INTL) - LTLIBOBJS="$LTLIBOBJS intl.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS internat" fi fi if test "$wxUSE_LOG" = "yes"; then AC_DEFINE(wxUSE_LOG) - LTLIBOBJS="$LTLIBOBJS log.lo" fi if test "$wxUSE_LONGLONG" = "yes"; then AC_DEFINE(wxUSE_LONGLONG) - LTLIBOBJS="$LTLIBOBJS longlong.lo" fi if test "$wxUSE_SOCKETS" = "yes" ; then if test "$wxUSE_THREADS" = "yes" ; then AC_DEFINE(wxUSE_SOCKETS) - LTLIBOBJS="$LTLIBOBJS sckint.lo socket.lo sckaddr.lo protocol.lo http.lo ftp.lo url.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS wxsocket" + INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS protocol" else AC_MSG_WARN(socket classes require --with-threads and won't be compiled without it) wxUSE_SOCKETS=0 @@ -1429,10 +1468,6 @@ fi if test "$wxUSE_STREAMS" = "yes" ; then AC_DEFINE(wxUSE_STREAMS) - LTLIBOBJS="$LTLIBOBJS stream.lo wfstream.lo datstrm.lo mstream.lo objstrm.lo" - if test "$wxUSE_SOCKETS" = "yes" ; then - LTLIBOBJS="$LTLIBOBJS sckstrm.lo" - fi fi if test "$wxUSE_SERIAL" = "yes" ; then @@ -1476,7 +1511,6 @@ if test "$wxUSE_JOYSTICK" = 1; then AC_CHECK_HEADERS(linux/joystick.h) if test "$ac_cv_header_linux_joystick_h" = "yes"; then AC_DEFINE(wxUSE_JOYSTICK) - LTLIBOBJS="$LTLIBOBJS joystick.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS joytest" fi fi @@ -1506,7 +1540,6 @@ fi if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then AC_DEFINE(wxUSE_DYNLIB_CLASS) - LTLIBOBJS="$LTLIBOBJS dynlib.lo" fi dnl --------------------------------------------------------------------------- @@ -1528,7 +1561,7 @@ dnl ---------------------------------------------------------------- IODBC_C_SRC="" if test "$wxUSE_ODBC" = "yes" ; then AC_DEFINE(wxUSE_ODBC) - EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/iodbc" + EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../iodbc" LTLIBOBJS="$LTLIBOBJS catalog.lo connect.lo dlf.lo dlproc.lo execute.lo fetch.lo hdbc.lo henv.lo herr.lo hstmt.lo info.lo itrace.lo misc.lo prepare.lo result.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" fi @@ -1539,7 +1572,6 @@ dnl ---------------------------------------------------------------- if test "$wxUSE_POSTSCRIPT" = "yes" ; then AC_DEFINE(wxUSE_POSTSCRIPT) - LTLIBOBJS="$LTLIBOBJS printps.lo dcpsg.lo" fi AC_DEFINE(wxUSE_AFM_FOR_POSTSCRIPT) @@ -1552,51 +1584,39 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_CONSTRAINTS" = "yes"; then AC_DEFINE(wxUSE_CONSTRAINTS) - - LTLIBOBJS="$LTLIBOBJS layout.lo laywin.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS layout" fi if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then AC_DEFINE(wxUSE_MDI_ARCHITECTURE) - LTLIBOBJS="$LTLIBOBJS mdi.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mdi" fi if test "$wxUSE_DOC_VIEW_ARCHITECTURE" = "yes" ; then AC_DEFINE(wxUSE_DOC_VIEW_ARCHITECTURE) - LTLIBOBJS="$LTLIBOBJS docview.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docview" if test "$wxUSE_MDI_ARCHITECTURE" = "yes"; then - LTLIBOBJS="$LTLIBOBJS docmdi.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS docvwmdi" fi fi if test "$wxUSE_HELP" = "yes"; then AC_DEFINE(wxUSE_HELP) - LTLIBOBJS="$LTLIBOBJS helpext.lo helphtml.lo helpbase.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help" fi if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then AC_DEFINE(wxUSE_PRINTING_ARCHITECTURE) - LTLIBOBJS="$LTLIBOBJS prntbase.lo paper.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS printing" fi if test "$wxUSE_PROLOGIO" = "yes" ; then AC_DEFINE(wxUSE_PROLOGIO) - LTLIBOBJS="$LTLIBOBJS wxexpr.lo parser.lo" fi if test "$wxUSE_RESOURCES" = "yes" ; then if test "$wxUSE_PROLOGIO" = "yes" ; then AC_DEFINE(wxUSE_RESOURCES) - LTLIBOBJS="$LTLIBOBJS resource.lo" - if test "$wxUSE_GTK" = 1; then - LTLIBOBJS="$LTLIBOBJS utilsres.lo" - fi SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" else AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.]) @@ -1613,22 +1633,16 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_IPC" = "yes"; then AC_DEFINE(wxUSE_IPC) - LTLIBOBJS="$LTLIBOBJS ipcbase.lo sckipc.lo" fi if test "$wxUSE_CLIPBOARD" = "yes"; then AC_DEFINE(wxUSE_CLIPBOARD) - LTLIBOBJS="$LTLIBOBJS clipbrd.lo dataobj.lo" fi if test "$wxUSE_DRAG_AND_DROP" = "yes"; then if test "$WXGTK12" = 1 ; then AC_DEFINE(wxUSE_DRAG_AND_DROP) - LTLIBOBJS="$LTLIBOBJS dnd.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd" - if test "$wxUSE_CLIPBOARD" != "yes"; then - LTLIBOBJS="$LTLIBOBJS dataobj.lo" - fi else AC_MSG_WARN(drag and drop is only supported under GTK 1.2) fi @@ -1644,61 +1658,50 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_ACCEL" = "yes"; then AC_DEFINE(wxUSE_ACCEL) - LTLIBOBJS="$LTLIBOBJS accel.lo" fi if test "$wxUSE_CARET" = "yes"; then AC_DEFINE(wxUSE_CARET) - LTLIBOBJS="$LTLIBOBJS caret.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS caret" fi if test "$wxUSE_COMBOBOX" = "yes"; then AC_DEFINE(wxUSE_COMBOBOX) - LTLIBOBJS="$LTLIBOBJS choice.lo combobox.lo" fi if test "$wxUSE_BMPBUTTON" = "yes"; then AC_DEFINE(wxUSE_BMPBUTTON) - LTLIBOBJS="$LTLIBOBJS bmpbuttn.lo" fi if test "$wxUSE_CHECKBOX" = "yes"; then AC_DEFINE(wxUSE_CHECKBOX) - LTLIBOBJS="$LTLIBOBJS checkbox.lo" fi if test "$wxUSE_CHECKLST" = "yes"; then AC_DEFINE(wxUSE_CHECKLISTBOX) - LTLIBOBJS="$LTLIBOBJS checklst.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS checklst" fi if test "$wxUSE_GAUGE" = "yes"; then AC_DEFINE(wxUSE_GAUGE) - LTLIBOBJS="$LTLIBOBJS gauge.lo" fi if test "$wxUSE_GRID" = "yes"; then AC_DEFINE(wxUSE_GRID) - LTLIBOBJS="$LTLIBOBJS gridg.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS grid" fi if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_IMAGLIST) - LTLIBOBJS="$LTLIBOBJS imaglist.lo" fi if test "$wxUSE_LISTBOX" = "yes"; then AC_DEFINE(wxUSE_LISTBOX) - LTLIBOBJS="$LTLIBOBJS listbox.lo" fi if test "$wxUSE_LISTCTRL" = "yes"; then if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_LISTCTRL) - LTLIBOBJS="$LTLIBOBJS listctrl.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS listctrl" else AC_MSG_WARN([wxListCtrl requires wxImageList and won't be compiled without it]) @@ -1707,77 +1710,63 @@ fi if test "$wxUSE_NOTEBOOK" = "yes"; then AC_DEFINE(wxUSE_NOTEBOOK) - LTLIBOBJS="$LTLIBOBJS notebook.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi if test "$wxUSE_RADIOBOX" = "yes"; then AC_DEFINE(wxUSE_RADIOBOX) - LTLIBOBJS="$LTLIBOBJS radiobox.lo" fi if test "$wxUSE_RADIOBTN" = "yes"; then AC_DEFINE(wxUSE_RADIOBTN) - LTLIBOBJS="$LTLIBOBJS radiobut.lo" fi -if test "wxUSE_SASH" = 1; then +if test "$wxUSE_SASH" = "yes"; then AC_DEFINE(wxUSE_SASH) - LTLIBOBJS="$LTLIBOBJS sashwin.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sashtest" fi if test "$wxUSE_SCROLLBAR" = "yes"; then AC_DEFINE(wxUSE_SCROLLBAR) - LTLIBOBJS="$LTLIBOBJS scrolbar.lo scrolwin.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS scroll" fi if test "$wxUSE_SLIDER" = "yes"; then AC_DEFINE(wxUSE_SLIDER) - LTLIBOBJS="$LTLIBOBJS slider.lo" fi if test "$wxUSE_SPINBTN" = "yes"; then AC_DEFINE(wxUSE_SPINBTN) - LTLIBOBJS="$LTLIBOBJS spinbutt.lo" fi if test "$wxUSE_SPLITTER" = "yes"; then AC_DEFINE(wxUSE_SPLITTER) - LTLIBOBJS="$LTLIBOBJS splitter.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS splitter" fi if test "$wxUSE_STATBMP" = "yes"; then AC_DEFINE(wxUSE_STATBMP) - LTLIBOBJS="$LTLIBOBJS statbmp.lo" fi if test "$wxUSE_STATBOX" = "yes"; then AC_DEFINE(wxUSE_STATBOX) - LTLIBOBJS="$LTLIBOBJS statbox.lo" fi if test "$wxUSE_STATLINE" = "yes"; then AC_DEFINE(wxUSE_STATLINE) - LTLIBOBJS="$LTLIBOBJS statline.lo" fi if test "$wxUSE_STATUSBAR" = "yes"; then AC_DEFINE(wxUSE_STATUSBAR) - LTLIBOBJS="$LTLIBOBJS statusbr.lo" fi if test "$wxUSE_TABDIALOG" = "yes"; then AC_DEFINE(wxUSE_TAB_DIALOG) - LTLIBOBJS="$LTLIBOBJS tabg.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS tab" fi if test "$wxUSE_TOOLBAR" = "yes"; then AC_DEFINE(wxUSE_TOOLBAR) - LTLIBOBJS="$LTLIBOBJS tbarbase.lo tbargtk.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS toolbar" fi @@ -1786,14 +1775,12 @@ if test "$wxUSE_TOOLTIPS" = "yes" ; then AC_MSG_WARN(tooltips are not supported yet under Motif) else AC_DEFINE(wxUSE_TOOLTIPS) - LTLIBOBJS="$LTLIBOBJS tooltip.lo" fi fi if test "$wxUSE_TREECTRL" = "yes"; then if test "$wxUSE_IMAGLIST" = "yes"; then AC_DEFINE(wxUSE_TREECTRL) - LTLIBOBJS="$LTLIBOBJS treectrl.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treectrl" else AC_MSG_WARN([wxTreeCtrl requires wxImageList and won't be compiled without it]) @@ -1804,50 +1791,43 @@ dnl --------------------------------------------------------------------------- dnl misc options dnl --------------------------------------------------------------------------- -if test "$wxUSE_WXTREE" = "yes"; then - AC_DEFINE(wxUSE_WXTREE) -fi +dnl TODO this is unused for now... +dnl if test "$wxUSE_WXTREE" = "yes"; then +dnl AC_DEFINE(wxUSE_WXTREE) +dnl fi if test "$wxUSE_METAFILE" = "yes"; then AC_DEFINE(wxUSE_METAFILE) - LTLIBOBJS="$LTLIBOBJS metafile.lo" fi if test "$wxUSE_COMMONDLGS" = "yes"; then dnl these classes don't depend on anything at all - LTLIBOBJS="$LTLIBOBJS progdlgg.lo filedlg.lo fontdlgg.lo" if test "$wxUSE_CONSTRAINTS" != "yes"; then AC_MSG_WARN(many common dialogs cannot be used without constraints so they won't be compiled without them) else AC_DEFINE(wxUSE_CONSTRAINTS) AC_DEFINE(wxUSE_TEXTDLG) - LTLIBOBJS="$LTLIBOBJS colrdlgg.lo textdlgg.lo choicdgg.lo" if test "$wxUSE_TREECTRL" != "yes"; then AC_MSG_WARN(wxDirDialog cannot be used without wxTreeCtrl and it won't be compiled without it) else AC_DEFINE(wxUSE_DIRDLG) - LTLIBOBJS="$LTLIBOBJS dirdlgg.lo" fi fi - if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes"; then - LTLIBOBJS="$LTLIBOBJS prntdlgg.lo" - else + if test "$wxUSE_PRINTING_ARCHITECTURE" = "no"; then AC_MSG_WARN([wxPrintDialog class won't be compiled without printing support]) fi fi if test "$wxUSE_MINIFRAME" = "yes"; then AC_DEFINE(wxUSE_MINIFRAME) - LTLIBOBJS="$LTLIBOBJS minifram.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram" fi if test "$wxUSE_VALIDATORS" = "yes"; then AC_DEFINE(wxUSE_VALIDATORS) - LTLIBOBJS="$LTLIBOBJS valgen.lo validate.lo valtext.lo" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS validate" fi @@ -1864,10 +1844,10 @@ EXTRA_LIBS="$LIBS $POSIX4_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $GUILIBS" dnl all the libraries needed to link wxWindows programs (when the library is not dnl yet installed) -LIBS="\${top_builddir}/src/libwx_${WX_LIBRARY}.la $EXTRA_LIBS" +LIBS="\${top_builddir}/src/${TOOLKIT_DIR}/${WX_LIBRARY_NAME} $EXTRA_LIBS" dnl all -I options we must pass to the compiler -INCLUDES="$TOOLKIT_INCLUDE $ZLIB_INCLUDE $LIBPNG_INCLUDE -I. -I\${top_builddir}/include -I\${top_srcdir}/include" +INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $TOOLKIT_INCLUDE $ZLIB_INCLUDE $LIBPNG_INCLUDE" dnl C/C++ compiler options used to compile wxWindows if test "$ac_cv_prog_gcc" = "yes"; then @@ -1892,10 +1872,23 @@ if test "$wxUSE_GUI" = "yes"; then forty fractal image wxpoem" fi +dnl for convenience, sort the files to build in alphabetical order +dnl +dnl another shell command to do it which might be faster but is less clear: +dnl LTLIBOBJS="`for obj in $LTLIBOBJS; do echo $obj; done | sort | sed 's@^@ @'`" +LTLIBOBJS="`echo $LTLIBOBJS | tr -s ' ' | tr ' ' '\n' | sort | tr '\n' ' '`" + +dnl for convenience, sort the samples in alphabetical order +dnl +dnl FIXME For some mysterious reasons, sometimes the directories are duplicated +dnl in this list - hence uniq. But normally, this shouldn't be needed! +SAMPLES_SUBDIRS="`echo $SAMPLES_SUBDIRS | tr -s ' ' | tr ' ' '\n' | sort | uniq | tr '\n' ' '`" + dnl global options AC_SUBST(WX_MAJOR_VERSION_NUMBER) AC_SUBST(WX_MINOR_VERSION_NUMBER) AC_SUBST(WX_RELEASE_NUMBER) +AC_SUBST(WX_LIBRARY_NAME) AC_SUBST(WX_LIBRARY) dnl suppress libtool's informational messages - they duplicate its command line @@ -1916,6 +1909,8 @@ AC_SUBST(EXTRA_VPATH) AC_SUBST(LTLIBOBJS) dnl additional subdirectories where we will build +AC_SUBST(SRC_SUBDIRS) +AC_SUBST(INCLUDE_SUBDIRS) AC_SUBST(UTILS_SUBDIRS) AC_SUBST(DOCS_SUBDIRS) AC_SUBST(SAMPLES_SUBDIRS) @@ -1926,9 +1921,11 @@ AC_SUBST(EXTRA_LIBS) AC_SUBST(LIBS) dnl create the configuration header file from the template -SETUPH_DIR=include/wx/${TOOLKIT_DIR} -mkdir -p ${SETUPH_DIR} -AM_CONFIG_HEADER(${SETUPH_DIR}/setup.h:include/wx/unix/setup.h.in) +dnl +dnl NB: automake can't work correctly if our header lives in a directory which +dnl is only determined at configure time, so we create it on the top-level +dnl and make a link to allow '#include "wx/setup.h"' to still work +AM_CONFIG_HEADER(setup.h) dnl MAKE_SET will be replaced with "MAKE=..." or nothing if make sets MAKE dnl itself (this is macro is required if SUBDIRS variable is used in Makefile.am @@ -1939,7 +1936,18 @@ dnl create each of the files in the space separated list from the file.in dnl (the original file name may be overriden by appending another name after a dnl colon) AC_OUTPUT([ - Makefile src/Makefile wx-config + wx-config + Makefile + src/Makefile + src/gtk/Makefile + include/Makefile + include/wx/Makefile + include/wx/generic/Makefile + include/wx/gtk/Makefile + include/wx/motif/Makefile + include/wx/msw/Makefile + include/wx/protocol/Makefile + include/wx/unix/Makefile samples/Makefile samples/bombs/Makefile samples/caret/Makefile @@ -1981,6 +1989,7 @@ AC_OUTPUT([ samples/splitter/Makefile samples/tab/Makefile samples/taskbar/Makefile + samples/text/Makefile samples/thread/Makefile samples/toolbar/Makefile samples/treectrl/Makefile @@ -1989,5 +1998,15 @@ AC_OUTPUT([ samples/wxpoem/Makefile samples/wxsocket/Makefile ], - [chmod +x wx-config], [SETUPH_DIR=${SETUPH_DIR}]) + [ + chmod +x wx-config + if test ! -e include/wx/${TOOLKIT_DIR}/setup.h; then + ${LN_S} `pwd`/setup.h include/wx/${TOOLKIT_DIR}/setup.h + fi + ], + [ + LN_S="${ac_cv_prog_LN_S}" + TOOLKIT_DIR="${TOOLKIT_DIR}" + ] + )