X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a98a85452729f479bad8538738ee899a0b1aa34..de5ae7c6e6bd3ac764d3552a9e6fd4a287f01299:/configure.in diff --git a/configure.in b/configure.in index 091bad732f..33a66f0785 100644 --- a/configure.in +++ b/configure.in @@ -30,7 +30,7 @@ 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" +dnl LIBOBJS="$LIBOBJS common/extended.o" dnl ------------------------------------------------------------------------ dnl Check platform (host system) @@ -148,6 +148,8 @@ esac if test "$USE_UNIX" = 1 ; then wxUSE_UNIX=yes AC_DEFINE(__UNIX__) + EXTRA_VPATH="$EXTRA_VPATH:\$(srcdir)/../unix" + INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS unix" fi dnl Linux: test for libc5/glibc2: glibc2 has gettext() included @@ -252,7 +254,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 +343,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 +373,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 +408,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 +677,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 +698,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 +769,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 +820,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 +934,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 +986,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 +997,8 @@ 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}2.la" dnl ------------------------------------------------------------------------ dnl Check for headers @@ -1144,7 +1160,6 @@ 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 define autoconf macro to check for given function in both pthread and @@ -1268,29 +1283,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 +1348,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 +1365,6 @@ dnl --------------------------------------------------------------------------- if test "$wxUSE_UNIX" = "yes"; then AC_DEFINE(wxUSE_UNIX) - LTLIBOBJS="$LTLIBOBJS utilsunx.lo" fi dnl --------------------------------------------------------------------------- @@ -1363,18 +1373,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 +1389,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 +1397,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 +1406,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 +1431,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 +1474,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 +1503,6 @@ fi if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then AC_DEFINE(wxUSE_DYNLIB_CLASS) - LTLIBOBJS="$LTLIBOBJS dynlib.lo" fi dnl --------------------------------------------------------------------------- @@ -1528,7 +1524,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 +1535,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,42 +1547,34 @@ 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 @@ -1613,22 +1600,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 +1625,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 +1677,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 +1742,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 +1758,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,7 +1811,7 @@ 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/${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" @@ -1892,11 +1839,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) +AC_SUBST(WX_LIBRARY_NAME) dnl suppress libtool's informational messages - they duplicate its command line LIBTOOL="$LIBTOOL --silent" @@ -1916,6 +1875,7 @@ AC_SUBST(EXTRA_VPATH) AC_SUBST(LTLIBOBJS) dnl additional subdirectories where we will build +AC_SUBST(INCLUDE_SUBDIRS) AC_SUBST(UTILS_SUBDIRS) AC_SUBST(DOCS_SUBDIRS) AC_SUBST(SAMPLES_SUBDIRS) @@ -1926,9 +1886,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 +1901,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 @@ -1989,5 +1962,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}" + ] + )