X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c521c4947e25963c1a3de4855b6b2fdb4e24843b..8816486e250c27aa44c9b6e6e61611e8617ad035:/configure.in diff --git a/configure.in b/configure.in index d02b8613b2..1d3f5e5ab3 100644 --- a/configure.in +++ b/configure.in @@ -803,6 +803,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_STATLINE=no DEFAULT_wxUSE_STATUSBAR=yes DEFAULT_wxUSE_TABDIALOG=no + DEFAULT_wxUSE_TOGGLEBTN=no DEFAULT_wxUSE_TOOLBAR=no DEFAULT_wxUSE_TOOLBAR_NATIVE=no DEFAULT_wxUSE_TOOLBAR_SIMPLE=no @@ -925,6 +926,7 @@ else DEFAULT_wxUSE_STATLINE=yes DEFAULT_wxUSE_STATUSBAR=yes DEFAULT_wxUSE_TABDIALOG=no + DEFAULT_wxUSE_TOGGLEBTN=yes DEFAULT_wxUSE_TOOLBAR=yes DEFAULT_wxUSE_TOOLBAR_NATIVE=yes DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes @@ -1103,6 +1105,7 @@ dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard classes], wxUSE_CLIPBOARD) WX_ARG_ENABLE(dnd, [ --enable-dnd use Drag'n'Drop classes], wxUSE_DRAG_AND_DROP) +WX_ARG_ENABLE(metafile, [ --enable-metafile use win32 metafiles], wxUSE_METAFILE) dnl TODO: doesn't work yet WX_ARG_ENABLE(wxtree, [ --enable-wxtree make wxTree library], wxUSE_WXTREE) @@ -1144,6 +1147,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then DEFAULT_wxUSE_STATLINE=yes DEFAULT_wxUSE_STATUSBAR=yes DEFAULT_wxUSE_TAB_DIALOG=yes + DEFAULT_wxUSE_TOGGLEBTN=yes DEFAULT_wxUSE_TOOLBAR=yes DEFAULT_wxUSE_TOOLBAR_NATIVE=yes DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes @@ -1177,6 +1181,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then DEFAULT_wxUSE_STATLINE=no DEFAULT_wxUSE_STATUSBAR=no DEFAULT_wxUSE_TAB_DIALOG=no + DEFAULT_wxUSE_TOGGLEBTN=no DEFAULT_wxUSE_TOOLBAR=no DEFAULT_wxUSE_TOOLBAR_NATIVE=no DEFAULT_wxUSE_TOOLBAR_SIMPLE=no @@ -1211,6 +1216,7 @@ WX_ARG_ENABLE(statbox, [ --enable-statbox use wxStaticBox class], wx WX_ARG_ENABLE(statline, [ --enable-statline use wxStaticLine class], wxUSE_STATLINE) WX_ARG_ENABLE(statusbar, [ --enable-statusbar use wxStatusBar class], wxUSE_STATUSBAR) WX_ARG_ENABLE(tabdialog, [ --enable-tabdialog use wxTabControl class], wxUSE_TABDIALOG) +WX_ARG_ENABLE(togglebtn, [ --enable-togglebtn use wxToggleButton class], wxUSE_TOGGLEBTN) WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUSE_TOOLBAR) WX_ARG_ENABLE(tbarnative, [ --enable-tbarnative use native wxToolBar class], wxUSE_TOOLBAR_NATIVE) WX_ARG_ENABLE(tbarsmpl, [ --enable-tbarsmpl use wxToolBarSimple class], wxUSE_TOOLBAR_SIMPLE) @@ -1547,10 +1553,6 @@ USE_GUI=1 TOOLKIT= TOOLKIT_INCLUDE= -GUIOBJS= -COMMONOBJS= -GENERICOBJS= - GUI_TK_LIBRARY= GUI_TK_LINK= @@ -1592,12 +1594,6 @@ if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then fi TOOLKIT=MSW - - GUIOBJS="\$(MSW_GUIOBJS)" - GUIHEADERS="\$(MSW_HEADERS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - UNIXOBJS= GUIDIST=MSW_DIST dnl we should calculate these @@ -1645,19 +1641,9 @@ dnl GUI_TK_LIBRARY="$GTK_LIBS -gthread12" dnl else dnl GUI_TK_LIBRARY="$GTK_LIBS -lgthread" dnl fi - TOOLKIT=GTK AFMINSTALL=afminstall - - GUIOBJS="\$(GTK_GUIOBJS)" - GUIHEADERS="\$(GTK_HEADERS)" - COMMONOBJS="\$(GTK_COMMONOBJS)" - GENERICOBJS="\$(GTK_GENERICOBJS)" - GUIDEPS="\$(GTK_GUIDEPS)" - COMMONDEPS="\$(GTK_COMMONDEPS)" - GENERICDEPS="\$(GTK_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" + TOOLKIT=GTK GUIDIST=GTK_DIST dnl test for XIM support in libgdk @@ -1703,16 +1689,6 @@ if test "$wxUSE_WINE" = 1; then GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" WXWINE=1 TOOLKIT=MSW - - GUIHEADERS="\$(MSW_HEADERS)" - GUIOBJS="\$(MSW_GUIOBJS)" - COMMONOBJS="\$(MSW_COMMONOBJS)" - GENERICOBJS="\$(MSW_GENERICOBJS)" - GUIDEPS="\$(MSW_GUIDEPS)" - COMMONDEPS="\$(MSW_COMMONDEPS)" - GENERICDEPS="\$(MSW_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" GUIDIST=MSW_DIST fi @@ -1889,39 +1865,17 @@ if test "$wxUSE_MOTIF" = 1; then GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXext -lXt -lX11" GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK" TOOLKIT=MOTIF - - GUIHEADERS="\$(MOTIF_HEADERS)" - GUIOBJS="\$(MOTIF_GUIOBJS)" - COMMONOBJS="\$(MOTIF_COMMONOBJS)" - GENERICOBJS="\$(MOTIF_GENERICOBJS)" - GUIDEPS="\$(MOTIF_GUIDEPS)" - COMMONDEPS="\$(MOTIF_COMMONDEPS)" - GENERICDEPS="\$(MOTIF_GENERICDEPS)" - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" GUIDIST=MOTIF_DIST fi if test "$wxUSE_MAC" = 1; then TOOLKIT=MAC - UNIXOBJS="\$(UNIX_OBJS)" - UNIXDEPS="\$(UNIX_DEPS)" dnl we can't call this MAC_DIST or autoconf thinks its a macro GUIDIST=MACX_DIST fi if test "$wxUSE_PM" = 1; then TOOLKIT=PM - - GUIOBJS="\$(PM_GUIOBJS)" - GUIHEADERS="\$(PM_HEADERS)" - COMMONOBJS="\$(PM_COMMONOBJS)" - GENERICOBJS="\$(PM_GENERICOBJS)" - GUIDEPS="\$(PM_GUIDEPS)" - COMMONDEPS="\$(PM_COMMONDEPS)" - GENERICDEPS="\$(PM_GENERICDEPS)" - UNIXOBJS= - UNIXDEPS= GUIDIST=GTK_DIST fi @@ -1949,10 +1903,8 @@ fi ALL_OBJECTS="\$(GUIOBJS) \$(COMMONOBJS) \$(GENERICOBJS) \$(UNIXOBJS) \$(HTMLOBJS) \$(OGLOBJS)" dnl ODBC objects are Unix only - if test "$TOOLKIT" != "MSW"; then - if test "$wxUSE_ODBC" = "yes" ; then - ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" - fi + if test "$TOOLKIT" != "MSW" -a "$wxUSE_ODBC" = "yes" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(IODBCOBJS)" fi if test "$wxUSE_LIBJPEG" = "yes" ; then @@ -2012,12 +1964,6 @@ else dnl distribute only wxBase sources/headers GUIDIST="BASE_DIST" DISTDIR="wxBase" - - dnl Apple MAC OS X specific extras - if test "$USE_UNIX" = 1 ; then - ALL_OBJECTS="${ALL_OBJECTS} dl_macosx.o" - ALL_DEPFILES="${ALL_DEPFILES} dl_macosx.d" - fi fi dnl the name of the (libtool) library @@ -2381,6 +2327,11 @@ dnl end... dnl if we fail to find vsnprintf, also try for _vsnprintf as that is what dnl we'll find under MSW if it exists. +dnl final note: AC_TRY_COMPILE will only be executed if there is nothing in +dnl the cache so we have to do AC_DEFINE(HAVE_VSNPRINTF) below and not inside +dnl it or the symbol wouldn't be defined for the 2nd and subsequent configure +dnl runs + dnl check for vsnprintf() - a safe version of vsprintf() AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf, [ @@ -2403,7 +2354,6 @@ AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf, vsnprintf(s, 42, fmt, argp); va_end(argp); ], [ - AC_DEFINE(HAVE_VSNPRINTF) wx_cv_func_vsnprintf=yes ], [ AC_TRY_COMPILE([ @@ -2425,15 +2375,19 @@ AC_CACHE_CHECK([for vsnprintf], wx_cv_func_vsnprintf, _vsnprintf(s, 42, fmt, argp); va_end(argp); ], [ - AC_DEFINE(HAVE_VSNPRINTF) wx_cv_func_vsnprintf=yes ], [ - AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) wx_cv_func_vsnprintf=no ]) ]) ]) +if test "$wx_cv_func_vsnprintf" = yes; then + AC_DEFINE(HAVE_VSNPRINTF) +else + AC_MSG_WARN(unsafe function sprintf will be used instead of snprintf) +fi + dnl check for vsscanf() AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf, [ @@ -2454,13 +2408,16 @@ AC_CACHE_CHECK([for vsscanf], wx_cv_func_vsscanf, vsscanf("42", fmt, argp); va_end(argp); ], [ - AC_DEFINE(HAVE_VSSCANF) wx_cv_func_vsscanf=yes ], [ wx_cv_func_vsscanf=no ]) ]) +if test "$wx_cv_func_vsscanf" = yes; then + AC_DEFINE(HAVE_VSSCANF) +fi + AC_LANG_RESTORE dnl the following tests are for Unix(like) systems only @@ -2837,12 +2794,13 @@ fi DEP_INFO_FLAGS= CODE_GEN_FLAGS= +CODE_GEN_FLAGS_CXX= if test "$GCC" = yes ; then if test "$wxUSE_NO_RTTI" = "yes" ; then - CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-rtti" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS -fno-rtti" fi if test "$wxUSE_NO_EXCEPTIONS" = "yes" ; then - CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fno-exceptions" + CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS -fno-exceptions" fi if test "$wxUSE_PERMISSIVE" = "yes" ; then CODE_GEN_FLAGS="$CODE_GEN_FLAGS -fpermissive" @@ -3457,9 +3415,6 @@ if test "$wxUSE_ODBC" = "yes" ; then AC_DEFINE(wxUSE_ODBC) WXODBCFLAG="-D_IODBC_" SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS db" - IODBCOBJS="\$(IODBC_OBJS)" -else - IODBCOBJS= fi dnl ---------------------------------------------------------------- @@ -3567,7 +3522,18 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then dnl this one does the right thing though if test "$ac_cv_header_ole2_h" = "yes" ; then if test "$GCC" = yes ; then + ALL_OBJECTS="$ALL_OBJECTS \$(OLEOBJS)" + ALL_DEPFILES="$ALL_DEPFILES \$(OLEDEPS)" CODE_GEN_FLAGS_CXX="$CODE_GEN_FLAGS_CXX -fvtable-thunks" + LIBS="$LIBS -lole32 -luuid" + + dnl metafiles need the ole code, right?? if not this + dnl doesn't need to be in here. + if test "$wxUSE_METAFILE" = "yes"; then + AC_DEFINE(wxUSE_METAFILE) + dnl this one should probably be made separately configurable + AC_DEFINE(wxUSE_ENH_METAFILE) + fi fi else AC_MSG_WARN(Drag and drop disabled because OLE headers not found) @@ -3719,6 +3685,10 @@ if test "$wxUSE_TABDIALOG" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS tab" fi +if test "$wxUSE_TOGGLEBTN" = "yes"; then + AC_DEFINE(wxUSE_TOGGLEBTN) +fi + if test "$wxUSE_TOOLBAR_SIMPLE" = "yes"; then AC_DEFINE(wxUSE_TOOLBAR_SIMPLE) wxUSE_TOOLBAR="yes" @@ -3769,10 +3739,6 @@ dnl if test "$wxUSE_WXTREE" = "yes"; then dnl AC_DEFINE(wxUSE_WXTREE) dnl fi -if test "$wxUSE_METAFILE" = "yes"; then - AC_DEFINE(wxUSE_METAFILE) -fi - if test "$wxUSE_DIRDLG" = "yes"; then if test "$wxUSE_CONSTRAINTS" != "yes"; then AC_MSG_WARN(wxDirDialog requires constraints so it won't be compiled without them) @@ -3960,6 +3926,7 @@ AC_SUBST(SHARED_LD) AC_SUBST(PIC_FLAG) AC_SUBST(DEP_INFO_FLAGS) AC_SUBST(CODE_GEN_FLAGS) +AC_SUBST(CODE_GEN_FLAGS_CXX) AC_SUBST(BURNT_LIBRARY_NAME) AC_SUBST(BURNT_LIBRARY_NAME_GL) AC_SUBST(WX_TARGET_LIBRARY_SONAME) @@ -3979,16 +3946,6 @@ AC_SUBST(TOOLKIT_INCLUDE) AC_SUBST(WXCONFIG_INCLUDE) dnl what to compile -AC_SUBST(GUIHEADERS) -AC_SUBST(GUIOBJS) -AC_SUBST(COMMONOBJS) -AC_SUBST(GENERICOBJS) -AC_SUBST(GUIDEPS) -AC_SUBST(COMMONDEPS) -AC_SUBST(GENERICDEPS) -AC_SUBST(IODBCOBJS) -AC_SUBST(UNIXOBJS) -AC_SUBST(UNIXDEPS) AC_SUBST(ALL_OBJECTS) AC_SUBST(ALL_DEPFILES) @@ -4095,7 +4052,7 @@ AC_OUTPUT([ mkdir lib/wx/include/wx/${TOOLKIT_NAME} fi if test -f setup.h; then - cp -f setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h + cp -fp setup.h lib/wx/include/wx/${TOOLKIT_NAME}/setup.h fi dnl *move* setup.h to its final place @@ -4110,7 +4067,7 @@ AC_OUTPUT([ mkdir include/wx/${TOOLKIT_DIR} fi if test -f setup.h; then - mv -f setup.h include/wx/${TOOLKIT_DIR}/setup.h + cp -fp setup.h include/wx/${TOOLKIT_DIR}/setup.h fi ],