X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1a8d972ea735b97320f5569592e58507968199b..34a1d7328f198b5ad31c33a07a6078f089feb45f:/configure.in diff --git a/configure.in b/configure.in index 51dbfdf4dc..049843487e 100644 --- a/configure.in +++ b/configure.in @@ -40,7 +40,7 @@ AC_DEFUN(WX_PATH_FIND_LIBRARIES, ac_find_libraries= for ac_dir in $1; do - for ac_extension in a so sl; do + for ac_extension in a so sl dylib; do if test -f "$ac_dir/lib$2.$ac_extension"; then ac_find_libraries=$ac_dir break 2 @@ -393,6 +393,7 @@ USE_SUNOS= USE_ALPHA= USE_OSF= USE_BSD= +USE_DARWIN= USE_FREEBSD= USE_OPENBSD= USE_NETBSD= @@ -556,9 +557,9 @@ case "${host}" in *-*-darwin* ) USE_BSD=1 - USE_MAC=1 - AC_DEFINE(__MAC__) + USE_DARWIN=1 AC_DEFINE(__BSD__) + AC_DEFINE(__DARWIN__) AC_DEFINE(__UNIX__) DEFAULT_DEFAULT_wxUSE_MAC=1 ;; @@ -586,9 +587,27 @@ if test "$USE_BEOS" = 1; then INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS be" fi -dnl Linux: test for libc5/glibc2: glibc2 has gettext() included +dnl check for glibc version if test "$USE_LINUX" = 1; then - AC_CHECK_LIB(c,gettext,AC_DEFINE(wxHAVE_GLIBC2)) + AC_CACHE_CHECK([for glibc 2.1 or later], wx_lib_glibc21, + AC_TRY_COMPILE([#include ], + [ + #if !__GLIBC_PREREQ(2, 1) + #error not glibc2.1 + #endif + ], + [ + wx_lib_glibc21=yes + ], + [ + wx_lib_glibc21=no + ] + ) + ) + + if test "$wx_lib_glibc21" = "yes"; then + AC_DEFINE(wxHAVE_GLIBC2) + fi fi dnl --------------------------------------------------------------------------- @@ -634,6 +653,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_GUI=yes DEFAULT_wxUSE_CONTROLS=no + DEFAULT_wxUSE_REGEX=no DEFAULT_wxUSE_ZLIB=no DEFAULT_wxUSE_LIBPNG=no DEFAULT_wxUSE_LIBJPEG=no @@ -686,19 +706,24 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_CONSTRAINTS=no DEFAULT_wxUSE_IPC=no DEFAULT_wxUSE_HELP=no - DEFAULT_wxUSE_WXTREE=no + DEFAULT_wxUSE_MS_HTML_HELP=no + DEFAULT_wxUSE_WXHTML_HELP=no + DEFAULT_wxUSE_TREELAYOUT=no DEFAULT_wxUSE_METAFILE=no DEFAULT_wxUSE_MIMETYPE=no + DEFAULT_wxUSE_SYSTEM_OPTIONS=yes DEFAULT_wxUSE_COMMONDLGS=no DEFAULT_wxUSE_CHOICEDLG=no DEFAULT_wxUSE_COLOURDLG=no DEFAULT_wxUSE_DIRDLG=no DEFAULT_wxUSE_FILEDLG=no + DEFAULT_wxUSE_FINDREPLDLG=no DEFAULT_wxUSE_FONTDLG=no DEFAULT_wxUSE_MSGDLG=no DEFAULT_wxUSE_NUMBERDLG=no DEFAULT_wxUSE_TEXTDLG=no + DEFAULT_wxUSE_SPLASH=no DEFAULT_wxUSE_STARTUP_TIPS=no DEFAULT_wxUSE_PROGRESSDLG=no DEFAULT_wxUSE_WIZARDDLG=no @@ -729,6 +754,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_LISTBOX=no DEFAULT_wxUSE_LISTCTRL=no DEFAULT_wxUSE_NOTEBOOK=no + DEFAULT_wxUSE_PROPSHEET=no DEFAULT_wxUSE_RADIOBOX=no DEFAULT_wxUSE_RADIOBTN=no DEFAULT_wxUSE_SASH=no @@ -749,6 +775,7 @@ if test $DEBUG_CONFIGURE = 1; then DEFAULT_wxUSE_TOOLBAR_NATIVE=no DEFAULT_wxUSE_TOOLBAR_SIMPLE=no DEFAULT_wxUSE_TREECTRL=no + DEFAULT_wxUSE_POPUPWIN=no DEFAULT_wxUSE_UNICODE=no DEFAULT_wxUSE_WCSRTOMBS=no @@ -785,6 +812,7 @@ else DEFAULT_wxUSE_GUI=yes + DEFAULT_wxUSE_REGEX=yes DEFAULT_wxUSE_ZLIB=yes DEFAULT_wxUSE_LIBPNG=yes DEFAULT_wxUSE_LIBJPEG=yes @@ -837,19 +865,24 @@ else DEFAULT_wxUSE_CONSTRAINTS=yes DEFAULT_wxUSE_IPC=yes DEFAULT_wxUSE_HELP=yes - DEFAULT_wxUSE_WXTREE=yes + DEFAULT_wxUSE_MS_HTML_HELP=yes + DEFAULT_wxUSE_WXHTML_HELP=yes + DEFAULT_wxUSE_TREELAYOUT=yes DEFAULT_wxUSE_METAFILE=yes DEFAULT_wxUSE_MIMETYPE=yes + DEFAULT_wxUSE_SYSTEM_OPTIONS=yes DEFAULT_wxUSE_COMMONDLGS=yes DEFAULT_wxUSE_CHOICEDLG=yes DEFAULT_wxUSE_COLOURDLG=yes DEFAULT_wxUSE_DIRDLG=yes DEFAULT_wxUSE_FILEDLG=yes + DEFAULT_wxUSE_FINDREPLDLG=yes DEFAULT_wxUSE_FONTDLG=yes DEFAULT_wxUSE_MSGDLG=yes DEFAULT_wxUSE_NUMBERDLG=yes DEFAULT_wxUSE_TEXTDLG=yes + DEFAULT_wxUSE_SPLASH=yes DEFAULT_wxUSE_STARTUP_TIPS=yes DEFAULT_wxUSE_PROGRESSDLG=yes DEFAULT_wxUSE_WIZARDDLG=yes @@ -880,6 +913,7 @@ else DEFAULT_wxUSE_LISTBOX=yes DEFAULT_wxUSE_LISTCTRL=yes DEFAULT_wxUSE_NOTEBOOK=yes + DEFAULT_wxUSE_PROPSHEET=yes DEFAULT_wxUSE_RADIOBOX=yes DEFAULT_wxUSE_RADIOBTN=yes DEFAULT_wxUSE_SASH=yes @@ -900,6 +934,7 @@ else DEFAULT_wxUSE_TOOLBAR_NATIVE=yes DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes DEFAULT_wxUSE_TREECTRL=yes + DEFAULT_wxUSE_POPUPWIN=yes DEFAULT_wxUSE_UNICODE=no DEFAULT_wxUSE_WCSRTOMBS=no @@ -964,6 +999,7 @@ fi dnl for GUI only WX_ARG_WITH(dmalloc, [ --with-dmalloc use dmalloc library (www.letters.com/dmalloc)], wxUSE_DMALLOC) +WX_ARG_SYS_WITH(regex, [ --with-regex enable support for wxRegEx class], wxUSE_REGEX) WX_ARG_SYS_WITH(zlib, [ --with-zlib use zlib for LZW compression], wxUSE_ZLIB) WX_ARG_WITH(odbc, [ --with-odbc use the IODBC and wxODBC classes], wxUSE_ODBC) @@ -1044,6 +1080,7 @@ WX_ARG_ENABLE(catch_segvs, [ --enable-catch_segvs catch signals and pass t WX_ARG_ENABLE(snglinst, [ --enable-snglinst use wxSingleInstanceChecker class], wxUSE_SNGLINST_CHECKER) WX_ARG_ENABLE(mimetype, [ --enable-mimetypes use wxMimeTypesManager], wxUSE_MIMETYPE) +WX_ARG_ENABLE(system_options, [ --enable-sysoptions use wxSystemOptions], wxUSE_SYSTEM_OPTIONS) dnl --------------------------------------------------------------------------- dnl "big" options (i.e. those which change a lot of things throughout the library) @@ -1059,7 +1096,10 @@ dnl "big" GUI options dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(docview, [ --enable-docview use document view architecture], wxUSE_DOC_VIEW_ARCHITECTURE) -WX_ARG_ENABLE(help, [ --enable-help use help (using external browser at present)], wxUSE_HELP) +WX_ARG_ENABLE(help, [ --enable-help use help subsystem], wxUSE_HELP) +WX_ARG_ENABLE(mshtmlhelp, [ --enable-mshtmlhelp use MS HTML Help (win32)], wxUSE_MS_HTML_HELP) +WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML) +WX_ARG_ENABLE(htmlhelp, [ --enable-htmlhelp use wxHTML-based help], wxUSE_WXHTML_HELP) WX_ARG_ENABLE(constraints, [ --enable-constraints use layout-constraints system], wxUSE_CONSTRAINTS) WX_ARG_ENABLE(printarch, [ --enable-printarch use printing architecture], wxUSE_PRINTING_ARCHITECTURE) WX_ARG_ENABLE(mdi, [ --enable-mdi use multiple document interface architecture], wxUSE_MDI_ARCHITECTURE) @@ -1092,8 +1132,7 @@ WX_ARG_ENABLE(clipboard, [ --enable-clipboard use wxClipboard classes], 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) +WX_ARG_ENABLE(treelayout, [ --enable-treelayout use wxTreeLayout classes], wxUSE_TREELAYOUT) dnl --------------------------------------------------------------------------- dnl optional GUI controls (in alphabetical order except the first one) @@ -1121,6 +1160,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then DEFAULT_wxUSE_LISTBOX=yes DEFAULT_wxUSE_LISTCTRL=yes DEFAULT_wxUSE_NOTEBOOK=yes + DEFAULT_wxUSE_PROPSHEET=yes DEFAULT_wxUSE_RADIOBOX=yes DEFAULT_wxUSE_RADIOBTN=yes DEFAULT_wxUSE_SASH=yes @@ -1140,6 +1180,7 @@ if test "$wxUSE_CONTROLS" = "yes"; then DEFAULT_wxUSE_TOOLBAR_SIMPLE=yes DEFAULT_wxUSE_TOOLTIPS=yes DEFAULT_wxUSE_TREECTRL=yes + DEFAULT_wxUSE_POPUPWIN=yes elif test "$wxUSE_CONTROLS" = "no"; then DEFAULT_wxUSE_ACCEL=no DEFAULT_wxUSE_BMPBUTTON=no @@ -1157,6 +1198,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then DEFAULT_wxUSE_LISTBOX=no DEFAULT_wxUSE_LISTCTRL=no DEFAULT_wxUSE_NOTEBOOK=no + DEFAULT_wxUSE_PROPSHEET=no DEFAULT_wxUSE_RADIOBOX=no DEFAULT_wxUSE_RADIOBTN=no DEFAULT_wxUSE_SASH=no @@ -1176,6 +1218,7 @@ elif test "$wxUSE_CONTROLS" = "no"; then DEFAULT_wxUSE_TOOLBAR_SIMPLE=no DEFAULT_wxUSE_TOOLTIPS=no DEFAULT_wxUSE_TREECTRL=no + DEFAULT_wxUSE_POPUPWIN=no fi WX_ARG_ENABLE(accel, [ --enable-accel use accelerators], wxUSE_ACCEL) @@ -1194,6 +1237,7 @@ WX_ARG_ENABLE(imaglist, [ --enable-imaglist use wxImageList class], wx WX_ARG_ENABLE(listbox, [ --enable-listbox use wxListBox class], wxUSE_LISTBOX) WX_ARG_ENABLE(listctrl, [ --enable-listctrl use wxListCtrl class], wxUSE_LISTCTRL) WX_ARG_ENABLE(notebook, [ --enable-notebook use wxNotebook class], wxUSE_NOTEBOOK) +WX_ARG_ENABLE(propsheet, [ --enable-propsheet use wxPropertySheet class], wxUSE_PROPSHEET) WX_ARG_ENABLE(radiobox, [ --enable-radiobox use wxRadioBox class], wxUSE_RADIOBOX) WX_ARG_ENABLE(radiobtn, [ --enable-radiobtn use wxRadioButton class], wxUSE_RADIOBTN) WX_ARG_ENABLE(sash, [ --enable-sash use wxSashWindow class], wxUSE_SASH) @@ -1214,6 +1258,7 @@ WX_ARG_ENABLE(toolbar, [ --enable-toolbar use wxToolBar class], wxUS 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) WX_ARG_ENABLE(treectrl, [ --enable-treectrl use wxTreeCtrl class], wxUSE_TREECTRL) +WX_ARG_ENABLE(popupwin, [ --enable-popupwin use wxPopUpWindow class], wxUSE_POPUPWIN) dnl --------------------------------------------------------------------------- dnl common dialogs @@ -1223,10 +1268,12 @@ WX_ARG_ENABLE(commondlg, [ --enable-commondlg use common dialogs (wxDirD WX_ARG_ENABLE(choicedlg, [ --enable-choicedlg use wxChoiceDialog], wxUSE_CHOICEDLG) WX_ARG_ENABLE(coldlg, [ --enable-coldlg use wxColourDialog], wxUSE_COLOURDLG) WX_ARG_ENABLE(filedlg, [ --enable-filedlg use wxFileDialog], wxUSE_FILEDLG) +WX_ARG_ENABLE(filedlg, [ --enable-finddlg use wxFindReplaceDialog], wxUSE_FINDREPLDLG) WX_ARG_ENABLE(fontdlg, [ --enable-fontdlg use wxFontDialog], wxUSE_FONTDLG) WX_ARG_ENABLE(dirdlg, [ --enable-dirdlg use wxDirDialog], wxUSE_DIRDLG) WX_ARG_ENABLE(msgdlg, [ --enable-msgdlg use wxMessageDialog], wxUSE_MSGDLG) WX_ARG_ENABLE(numberdlg, [ --enable-numberdlg use wxNumberEntryDialog], wxUSE_NUMBERDLG) +WX_ARG_ENABLE(splash, [ --enable-splash use wxSplashScreen], wxUSE_SPLASH) WX_ARG_ENABLE(textdlg, [ --enable-textdlg use wxTextDialog], wxUSE_TEXTDLG) WX_ARG_ENABLE(tipdlg, [ --enable-tipdlg use startup tips], wxUSE_STARTUP_TIPS) WX_ARG_ENABLE(progressdlg, [ --enable-progressdlg use wxProgressDialog], wxUSE_PROGRESSDLG) @@ -1238,7 +1285,6 @@ dnl --------------------------------------------------------------------------- WX_ARG_ENABLE(menus, [ --enable-menus use wxMenu/wxMenuBar/wxMenuItem classes], wxUSE_MENUS) WX_ARG_ENABLE(miniframe, [ --enable-miniframe use wxMiniFrame class], wxUSE_MINIFRAME) -WX_ARG_ENABLE(html, [ --enable-html use wxHTML sub-library], wxUSE_HTML) WX_ARG_ENABLE(tooltips, [ --enable-tooltips use wxToolTip class], wxUSE_TOOLTIPS) WX_ARG_ENABLE(splines, [ --enable-splines use spline drawing code], wxUSE_SPLINES) WX_ARG_ENABLE(validators, [ --enable-validators use wxValidator and derived classes], wxUSE_VALIDATORS) @@ -1552,6 +1598,30 @@ dnl ------------------------------------------------------------------------ dnl flush the cache because checking for libraries below might abort AC_CACHE_SAVE +dnl ------------------------------------------------------------------------ +dnl Check for regex libraries +dnl ------------------------------------------------------------------------ + +REGEX_INCLUDE= +if test "$wxUSE_REGEX" != "no"; then + dnl according to Unix 98 specs, regcomp() is in libc but I believe that + dnl on some old systems it may be in libregex - check for it too? + AC_CHECK_HEADER(regex.h, AC_CHECK_FUNCS(regcomp)) + + if test "x$ac_cv_func_regcomp" != "xyes"; then + dnl we were asked to use the system version of regex lib only but it + dnl is not available + if test "$wxUSE_REGEX" = "sys"; then + AC_MSG_ERROR([system regex library not found! Use --with-regex to use the built-in regex library.]) + fi + + dnl fallback to the built in code + REGEX_INCLUDE="-I\${top_srcdir}/src/regex" + fi + + AC_DEFINE(wxUSE_REGEX) +fi + dnl ---------------------------------------------------------------- dnl search for toolkit (widget sets) dnl ---------------------------------------------------------------- @@ -1574,25 +1644,16 @@ if test "$wxUSE_GUI" = "yes"; then WXWINE= if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then - if test "$cross_compiling" = "yes" ; then - dnl mingw32 will find them even if they're not in one of standard paths - AC_MSG_WARN(skipping windows.h check for cross-compilation) - else - AC_MSG_CHECKING(for Windows headers) - WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, windows.h) - if test "$ac_find_includes" != "" ; then - AC_MSG_RESULT(found $ac_find_includes) - TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE -I$ac_find_includes" - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) - fi - fi + AC_CHECK_HEADER(windows.h, [], + [ + AC_MSG_ERROR(please set CFLAGS to contain the location of windows.h) + ]) INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw" + dnl --- Quick & Dirty ; link against most/all libraries dnl --- This will bloat the executable, but it'll work for now... - LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32" + LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32" dnl add extra odbc libs if we have compiled in odbc if test "$wxUSE_ODBC" = "yes" ; then @@ -2019,6 +2080,12 @@ equivalent variable and GTK+ is version 1.2.3 or above. fi fi + dnl REGEX_INCLUDE is only set if we want regex support and if we use our + dnl own sources and not the system library + if test "x$REGEX_INCLUDE" != "x" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)" + fi + if test "$wxUSE_LIBJPEG" = "yes" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(JPEGOBJS)" fi @@ -2053,7 +2120,7 @@ equivalent variable and GTK+ is version 1.2.3 or above. fi dnl misc other files depending on the port - PORT_FILES="src/\$(TOOLKITDIR)/files.lst" + PORT_FILES="\${top_srcdir}/src/\$(TOOLKITDIR)/files.lst" if test "$wxUSE_UNIVERSAL" = "yes"; then PORT_FILES="${PORT_FILES} \${top_srcdir}/src/univ/files.lst" fi @@ -2069,6 +2136,9 @@ else dnl this may be (almost) unneccesary for wxBase now we use TOOLKIT_NAME TOOLKIT_DIR="base" + dnl well, we have to set it to something... + TOOLKIT_VPATH="." + dnl the base name of the library and wxXXX-config files if test "$wxUSE_DEBUG_FLAG" = "yes"; then TOOLKIT_NAME="${TOOLKIT_DIR}d" @@ -2082,6 +2152,12 @@ else ALL_OBJECTS="\$(BASE_OBJS) \$(BASE_UNIX_OBJS)" ALL_DEPFILES="\$(BASE_DEPS) \$(BASE_UNIX_DEPS)" + dnl REGEX_INCLUDE is only set if we want regex support and if we use our + dnl own sources and not the system library + if test "x$REGEX_INCLUDE" != "x" ; then + ALL_OBJECTS="${ALL_OBJECTS} \$(REGEXOBJS)" + fi + if test "$wxUSE_ZLIB" = "yes" ; then ALL_OBJECTS="${ALL_OBJECTS} \$(ZLIBOBJS)" fi @@ -2089,7 +2165,7 @@ else dnl building wxBase only WX_LIBRARY="wx_${TOOLKIT_NAME}" - PORT_FILES="src/files.lst" + PORT_FILES="\${top_srcdir}/src/files.lst" RPM_FILES="src/rpmfiles.lst" RPM_SPEC="wxBase.spec" @@ -2106,89 +2182,103 @@ dnl the name of the static library WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a" WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY}_gl.a" -dnl the name of the shared library -WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" -WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" - -dnl the name of the links to the shared library -WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.so" -WX_LIBRARY_LINK3="lib${WX_LIBRARY}.so" -WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so.${WX_CURRENT}" -WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.so" -WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.so" - -dnl shared library settings -SHARED_LD= -PIC_FLAG= -WX_ALL= -WX_ALL_INSTALLED= -BURNT_LIBRARY_NAME= -WX_TARGET_LIBRARY_SONAME= - dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP --- if test "$wxUSE_SHARED" = "yes"; then + dnl the name of the shared library case "${host}" in + *-*-mingw32* ) + WX_LIBRARY_NAME_SHARED="wx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.dll" + ;; + *-hp-hpux* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -fPIC -o" - PIC_FLAG="-fPIC" - else + SO_SUFFIX="sl" + ;; + + *-*-darwin* ) + SO_SUFFIX="dylib" + ;; + + * ) + SO_SUFFIX="so" + ;; + esac + + dnl set the name of the shared lib if not done above + if test "x$SO_SUFFIX" != "x"; then + WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" + WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" + fi + + dnl the name of the links to the shared library + WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}" + WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.${SO_SUFFIX}" + WX_LIBRARY_LINK3="lib${WX_LIBRARY}.${SO_SUFFIX}" + WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}.${WX_CURRENT}" + WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.${SO_SUFFIX}" + WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.${SO_SUFFIX}" + + dnl install targets + if test "$wxUSE_OPENGL" = "yes"; then + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" + WX_ALL="CREATE_LINKS CREATE_LINKS_GL" + else + WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" + WX_ALL="CREATE_LINKS" + fi + + dnl the extra compiler flags needed for compilation of shared library + if test "$GCC" = "yes"; then + dnl the switch for gcc is the same under all platforms + PIC_FLAG="-fPIC" + fi + + dnl the command to use for creating the shared library + SHARED_LD="${CXX} -shared -o" + + case "${host}" in + *-hp-hpux* ) + dnl default settings are good for gcc but not for the native HP-UX + if test "$GCC" != "yes"; then dnl no idea why it wants it, but it does LDFLAGS="-L/usr/lib" SHARED_LD="${CXX} -b -o" PIC_FLAG="+Z" fi - WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_NAME}.sl" - WX_LIBRARY_NAME_SHARED_GL="libwx_${TOOLKIT_NAME}_gl.sl" - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="preinstall_gl" - WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}" - else - WX_ALL="${WX_LIBRARY_NAME_SHARED}" - fi + ;; - dnl in fact, these settings are for any platform using gcc *-*-linux* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" + if test "$GCC" != "yes"; then + AC_CACHE_CHECK([for Intel compiler], wx_cv_prog_icc, + [ + AC_TRY_COMPILE([], + [ + #ifndef __INTEL_COMPILER + #error Not icc + #endif + ], + wx_cv_prog_icc=yes, + wx_cv_prog_icc=no + ) + ]) + + if test "$wx_cv_prog_icc" = "yes"; then + PIC_FLAG="-KPIC" + fi + fi + if test "$wxUSE_BURNT_NAME" = "yes" ; then BURNT_LIBRARY_NAME="-Wl,-soname,${WX_LIBRARY_LINK1}" BURNT_LIBRARY_NAME_GL="-Wl,-soname,${WX_LIBRARY_LINK1_GL}" dnl substitute this in makelib.env for the contrib libs WX_TARGET_LIBRARY_SONAME="-Wl,-soname,\$(TARGETLIB_LINK1)" fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi - ;; - *-*-irix5* | *-*-irix6* ) - if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - else - SHARED_LD="${CXX} -shared -o" - fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi ;; + *-*-solaris2* ) if test "$GCC" = yes ; then - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - dnl newer versions of gcc need -isystem to compile X headers on dnl Solaris (which use old style C syntax) CPPFLAGS="$CPPFLAGS -isystem /usr/openwin/include" @@ -2196,76 +2286,24 @@ if test "$wxUSE_SHARED" = "yes"; then SHARED_LD="${CXX} -G -o" PIC_FLAG="-KPIC" fi - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi - ;; - *-*-sunos4* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-freebsd* | *-*-openbsd* | *-*-netbsd* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - fi ;; + *-*-darwin* ) + TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__DARWIN__ -D__POWERPC__" + CPPFLAGS="${CPPFLAGS} -fno-common" SHARED_LD="${CXX} -dynamiclib -o" PIC_FLAG="-dynamic -fPIC" - if test "$wxUSE_OPENGL" = "yes"; then - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL" - WX_ALL="CREATE_LINKS CREATE_LINKS_GL" - else - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" + + dnl add the resources target for wxMac + if test "$wxUSE_MAC" = 1 ; then + WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r" fi - dnl add the resources target - WX_ALL="${WX_ALL} ./lib/lib${WX_LIBRARY}-${WX_RELEASE}.r" - dnl the name of the shared library - WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" - WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}" - dnl the name of the links to the shared library - WX_LIBRARY_LINK1="lib${WX_LIBRARY}-${WX_RELEASE}.dylib.${WX_CURRENT}" - WX_LIBRARY_LINK2="lib${WX_LIBRARY}-${WX_RELEASE}.dylib" - WX_LIBRARY_LINK3="lib${WX_LIBRARY}.dylib" - WX_LIBRARY_LINK1_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib.${WX_CURRENT}" - WX_LIBRARY_LINK2_GL="lib${WX_LIBRARY}_gl-${WX_RELEASE}.dylib" - WX_LIBRARY_LINK3_GL="lib${WX_LIBRARY}_gl.dylib" - ;; - *-*-osf* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-dgux5* ) - SHARED_LD="${CXX} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" - ;; - *-*-sysv5* ) - SHARED_LD="${CC} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" ;; + *-*-aix* ) SHARED_LD="/usr/lpp/xlC/bin/makeC++SharedLib -p 0 -o" - WX_ALL=${WX_LIBRARY_NAME_SHARED} ;; + *-*-cygwin* ) dnl only static for now WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" @@ -2277,30 +2315,43 @@ if test "$wxUSE_SHARED" = "yes"; then WX_ALL="${WX_LIBRARY_NAME_STATIC}" fi ;; + *-*-mingw32* ) - dnl only static for now - WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" - WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_STATIC_GL}" + WX_LIBRARY_NAME_STATIC="lib/libwx${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}_${WX_RELEASE_NUMBER}.a" + SHARED_LD="${CC} -shared -Wl,--out-implib,${WX_LIBRARY_NAME_STATIC} -o" + TOOLKIT_DEF="${TOOLKIT_DEF} -DWXUSINGDLL=1" + WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1" + WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" + WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}" if test "$wxUSE_OPENGL" = "yes"; then WX_ALL_INSTALLED="preinstall_gl" - WX_ALL="${WX_LIBRARY_NAME_STATIC} ${WX_LIBRARY_NAME_STATIC_GL}" + WX_ALL="${WX_LIBRARY_NAME_SHARED} ${WX_LIBRARY_NAME_SHARED_GL}" else - WX_ALL="${WX_LIBRARY_NAME_STATIC}" + WX_ALL="${WX_LIBRARY_NAME_SHARED}" fi ;; + *-pc-os2_emx ) dnl only static for now WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}" WX_ALL="${WX_LIBRARY_NAME_STATIC}" ;; + *-*-beos* ) dnl can't use gcc under BeOS for shared library creation because it dnl complains about missing 'main' SHARED_LD="${LD} -shared -o" - PIC_FLAG="-fPIC" - WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS" - WX_ALL="CREATE_LINKS" ;; + + *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \ + *-*-sunos4* | \ + *-*-irix5* | *-*-irix6* | \ + *-*-osf* | \ + *-*-dgux5* | \ + *-*-sysv5* ) + dnl defaults are ok + ;; + *) AC_MSG_ERROR(unknown system type ${host}.) esac @@ -2310,6 +2361,7 @@ if test "$wxUSE_SHARED" = "yes"; then WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}" WX_TARGET_LIBRARY_GL="${WX_LIBRARY_NAME_SHARED_GL}" fi + dnl do not alter the LIBRARY_TYPE strings "so" and "a", they are magic WX_TARGET_LIBRARY_TYPE="so" else @@ -2361,6 +2413,31 @@ if test "$wxUSE_GUI" = "yes"; then fi fi +if test "$USE_WIN32" = 1; then + AC_CHECK_HEADERS(w32api.h) + + dnl check if can use _WIN_IE macro + AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win_ie, + [ + AC_TRY_COMPILE([#include ], + [ + #define wxCHECK_W32API_VERSION( major, minor ) \ + ( defined( __W32API_MAJOR_VERSION ) && defined( __W32API_MINOR_VERSION ) \ + && ( ( __W32API_MAJOR_VERSION > (major) ) \ + || ( __W32API_MAJOR_VERSION == (major) && __W32API_MINOR_VERSION >= (minor)))) + + #if !wxCHECK_W32API_VERSION(1,1) + #error You need w32api 1.1 or newer + #endif + ], [ + wx_cv_w32api_win_ie=yes + CPPFLAGS="$CPPFLAGS -D_WIN_IE=0x400" + ], [ + wx_cv_w32api_win_ie=no + ]) + ]) +fi + dnl --------------------------------------------------------------------------- dnl Checks for typedefs dnl --------------------------------------------------------------------------- @@ -2548,6 +2625,11 @@ AC_CHECK_LIB(c, wcslen, [ AC_CHECK_LIB(w, wcslen, [ AC_DEFINE(HAVE_WCSLEN) WCHAR_LINK="-lw" + ], [ + AC_CHECK_LIB(msvcrt, wcslen, [ + AC_DEFINE(HAVE_WCSLEN) + WCHAR_LINK="" + ]) ]) ]) @@ -2723,6 +2805,35 @@ fi dnl check for vfork() (even if it's the same as fork() in modern Unices) AC_CHECK_FUNCS(vfork) +dnl get the library function to use for wxGetDiskSpace() +AC_CACHE_CHECK(for statfs, wx_cv_func_statfs, + AC_TRY_COMPILE( + [ + #include + ], + [ + long l; + struct statfs fs; + statfs("/", &fs); + l = fs.f_bsize; + l += fs.f_blocks; + l += fs.f_bavail; + ], + [ + wx_cv_func_statfs=yes + ], + [ + wx_cv_func_statfs=no + ] + ) +) + +if test "$wx_cv_func_statfs" = "yes"; then + AC_DEFINE(HAVE_STATFS) +else + AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()]) +fi + dnl check for fcntl() or at least flock() needed by Unix implementation of dnl wxSingleInstanceChecker if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then @@ -2748,7 +2859,7 @@ if test "$USE_BEOS" = 1; then HAVE_SOME_SLEEP_FUNC=1 fi -if test "$USE_MAC" = 1; then +if test "$USE_DARWIN" = 1; then dnl Mac OS X has both nanosleep and usleep dnl but only usleep is defined in unistd.h AC_DEFINE(HAVE_USLEEP) @@ -2972,6 +3083,14 @@ if test "$wxUSE_THREADS" = "yes" ; then dnl defined, we do it by directly assigned dnl PTHREAD_MUTEX_RECURSIVE_MUTEX_INITIALIZER_NP to attr + dnl we need _GNU_SOURCE to get PTHREAD_MUTEX_RECURSIVE with glibc 2.1+ + dnl (strictly speaking we only need _XOPEN_SOURCE=500 but just defining + dnl this disables _BSD_SOURCE which breaks libtiff compilation, so it is + dnl simpler to just define _GNU_SOURCE to get everything) + if test "x$wx_lib_glibc21" = "xyes"; then + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + fi + AC_CACHE_CHECK([for pthread_mutexattr_t], wx_cv_type_pthread_mutexattr_t, [ AC_TRY_COMPILE([#include ], @@ -3016,7 +3135,7 @@ if test "$wxUSE_THREADS" = "yes" ; then dnl building MT programs under Solaris with the native compiler requires -mt dnl switch if test "$USE_SOLARIS" = "yes" -a "$GCC" != "yes"; then - CFLAGS="${CFLAGS} -mt" + CPPFLAGS="${CFLAGS} -mt" CXXFLAGS="${CXXFLAGS} -mt" LDFLAGS="${LDFLAGS} -mt" fi @@ -3028,10 +3147,9 @@ fi if test "$wxUSE_THREADS" = "yes"; then AC_DEFINE(wxUSE_THREADS) - dnl must define _REENTRANT for multithreaded code except for Mac OS X - if test "$wxUSE_MAC" = "0"; then - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + dnl must define _REENTRANT for multithreaded code except for Darwin/Mac OS X + if test "$USE_DARWIN" != 1; then + CPPFLAGS="${CPPFLAGS} -D_REENTRANT" fi SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread" @@ -3041,8 +3159,7 @@ else if test "$ac_cv_func_strtok_r" = "yes"; then AC_MSG_CHECKING(if -D_REENTRANT is needed) if test "$NEEDS_D_REENTRANT_FOR_R_FUNCS" = 1; then - CFLAGS="${CFLAGS} -D_REENTRANT" - CXXFLAGS="${CXXFLAGS} -D_REENTRANT" + CPPFLAGS="${CPPFLAGS} -D_REENTRANT" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -3068,9 +3185,9 @@ if test "$WXWINE" = 1 ; then fi if test "$wxUSE_MAC" = 1 ; then - TOOLKIT_DEF="${TOOLKIT_DEF} -D__UNIX__ -D__POWERPC__ -DTARGET_CARBON" - CFLAGS="${CFLAGS} -fno-common -fpascal-strings" - CPPFLAGS="${CPPFLAGS} -cpp-precomp -fno-common -fpascal-strings" + TOOLKIT_DEF="${TOOLKIT_DEF} -DTARGET_CARBON" + CPPFLAGS="${CPPFLAGS} -fpascal-strings" + CXXFLAGS="${CXXFLAGS} -cpp-precomp" AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(DEREZ, Derez, Derez, /Developer/Tools/Derez) RESCOMP=${REZ} @@ -3287,17 +3404,25 @@ if test "$wxUSE_FREETYPE" = "yes" -o "$wxUSE_FREETYPE" = "sys" ; then fi if test "$wxUSE_OPENGL" = "yes"; then - AC_CHECK_HEADER(GL/gl.h, [ + if test "$wxUSE_MAC" = 1; then AC_DEFINE(wxUSE_OPENGL) AC_DEFINE(wxUSE_GLCANVAS) - AC_CHECK_LIB(GL, glFlush, [ - OPENGL_LINK="-lGL -lGLU" - ],[ - AC_CHECK_LIB(MesaGL, glFlush, [ - OPENGL_LINK="-lMesaGL -lMesaGLU" - ],) - ],) - ],wxUSE_OPENGL=0) + OPENGL_LINK="-framework OpenGL -framework AGL" + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl" + else + AC_CHECK_HEADER(GL/gl.h, [ + AC_DEFINE(wxUSE_OPENGL) + AC_DEFINE(wxUSE_GLCANVAS) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS opengl" + AC_CHECK_LIB(GL, glFlush, [ + OPENGL_LINK="-lGL -lGLU" + ],[ + AC_CHECK_LIB(MesaGL, glFlush, [ + OPENGL_LINK="-lMesaGL -lMesaGLU" + ],) + ],) + ],wxUSE_OPENGL=0) + fi fi dnl --------------------------------------------------------------------------- @@ -3458,7 +3583,7 @@ if test "$wxUSE_STREAMS" = "yes" ; then AC_DEFINE(wxUSE_STREAMS) fi -dnl ------------------------------------------------------------------------ +dnl --------------------------------------------------------------------------- dnl time/date functions dnl ------------------------------------------------------------------------ @@ -3476,10 +3601,10 @@ if test "$wxUSE_DATETIME" = "yes"; then ], [ int tz; - tz = __timezone; + tz = timezone; ], [ - wx_cv_var_timezone=__timezone + wx_cv_var_timezone=timezone ], [ AC_TRY_COMPILE( @@ -3500,10 +3625,10 @@ if test "$wxUSE_DATETIME" = "yes"; then ], [ int tz; - tz = timezone; + tz = __timezone; ], [ - wx_cv_var_timezone=timezone + wx_cv_var_timezone=__timezone ], AC_MSG_ERROR(no timezone variable) ) @@ -3563,8 +3688,7 @@ if test "$wxUSE_DATETIME" = "yes"; then ], [ struct timeval tv; - struct timezone tz; - gettimeofday(&tv, &tz); + gettimeofday(&tv, NULL); ], wx_cv_func_gettimeofday_has_2_args=yes, AC_TRY_COMPILE( @@ -3577,7 +3701,10 @@ if test "$wxUSE_DATETIME" = "yes"; then gettimeofday(&tv); ], wx_cv_func_gettimeofday_has_2_args=no, - wx_cv_func_gettimeofday_has_2_args=unknown + [ + AC_MSG_WARN([failed to determine number of gettimeofday() arguments]) + wx_cv_func_gettimeofday_has_2_args=unknown + ] ) ) AC_LANG_RESTORE @@ -3718,8 +3845,8 @@ if test "$TOOLKIT" != "MSW"; then HAVE_DL_FUNCS=0 HAVE_SHL_FUNCS=0 if test "$wxUSE_DYNLIB_CLASS" = "yes"; then - if test "$USE_MAC" = 1; then - dnl Mac OS X needs dl_macosx.c to be compiled in to fake dlopen/dlerror + if test "$USE_DARWIN" = 1; then + dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X HAVE_DL_FUNCS=1 else dnl the test is a bit complicated because we check for dlopen() both with @@ -3859,6 +3986,28 @@ fi if test "$wxUSE_HELP" = "yes"; then AC_DEFINE(wxUSE_HELP) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS help" + + if test "$USE_WIN32" = 1; then + if test "$wxUSE_MS_HTML_HELP" = "yes"; then + AC_CHECK_HEADER(htmlhelp.h, + [ + AC_DEFINE(wxUSE_MS_HTML_HELP) + ], + [ + AC_MSG_WARN([MS HTML Help cannot be used without htmlhelp.h, disabled]) + wxUSE_MS_HTML_HELP=no + ]) + fi + fi + + if test "$wxUSE_WXHTML_HELP" = "yes"; then + if test "$wxUSE_HTML" = "yes"; then + AC_DEFINE(wxUSE_WXHTML_HELP) + else + AC_MSG_WARN(Cannot use wxHTML-based help without wxHTML so it won't be compiled) + wxUSE_WXHTML_HELP=no + fi + fi fi if test "$wxUSE_PRINTING_ARCHITECTURE" = "yes" ; then @@ -3875,12 +4024,8 @@ if test "$wxUSE_PROLOGIO" = "yes" ; then fi if test "$wxUSE_RESOURCES" = "yes" ; then - if test "$wxUSE_PROLOGIO" = "yes" ; then - AC_DEFINE(wxUSE_RESOURCES) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" - else - AC_MSG_WARN([wxWindows ressource system requires PrologIO and can't be compiled without it.]) - fi + AC_DEFINE(wxUSE_RESOURCES) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS resource" fi if test "$wxUSE_X_RESOURCES" = "yes"; then @@ -3891,6 +4036,40 @@ dnl --------------------------------------------------------------------------- dnl IPC: IPC, Drag'n'Drop, Clipboard, ... dnl --------------------------------------------------------------------------- +dnl check for ole headers and disable a few features requiring it if not +dnl present (earlier versions of mingw32 don't have ole2.h) +if test "$USE_WIN32" = 1; then + AC_CHECK_HEADERS(ole2.h) + + 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 -lrpcrt4 -loleaut32 -lole32 -luuid" + AC_DEFINE(wxUSE_OLE) + + fi + + dnl for OLE clipboard and dnd + AC_DEFINE(wxUSE_DATAOBJ) + else + AC_MSG_WARN([Some features disabled because OLE headers not found]) + + wxUSE_CLIPBOARD=no + wxUSE_DRAG_AND_DROP=no + wxUSE_DATAOBJ=no + fi + + dnl this is for MSW only, so we test for it inside "if USE_WIN32" + 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 + if test "$wxUSE_IPC" = "yes"; then if test "$wxUSE_SOCKETS" != "yes"; then AC_MSG_WARN(wxWindows IPC classes require sockets, disabled) @@ -3901,6 +4080,8 @@ fi if test "$wxUSE_CLIPBOARD" = "yes"; then AC_DEFINE(wxUSE_CLIPBOARD) + + dnl required by clipboard code in configuration check AC_DEFINE(wxUSE_DATAOBJ) fi @@ -3922,33 +4103,6 @@ if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then wxUSE_DRAG_AND_DROP=no fi - if test "$USE_WIN32" = 1; then - dnl check for ole headers and disable DnD if not present (earlier - dnl versions of mingw32 don't have them) - - AC_CHECK_HEADERS(ole2.h) - - 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) - wxUSE_DRAG_AND_DROP=no - fi - fi - if test "$wxUSE_DRAG_AND_DROP" = "yes"; then AC_DEFINE(wxUSE_DRAG_AND_DROP) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd" @@ -4060,6 +4214,12 @@ if test "$wxUSE_NOTEBOOK" = "yes"; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS notebook" fi +if test "$wxUSE_PROPSHEET" = "yes"; then + AC_DEFINE(wxUSE_PROPSHEET) + USES_CONTROLS=1 + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS proplist" +fi + if test "$wxUSE_RADIOBOX" = "yes"; then AC_DEFINE(wxUSE_RADIOBOX) USES_CONTROLS=1 @@ -4200,6 +4360,15 @@ if test "$wxUSE_TREECTRL" = "yes"; then fi fi +if test "$wxUSE_POPUPWIN" = "yes"; then + if test "$wxUSE_MAC" = 1; then + AC_MSG_WARN(Popup window is not yet supported under Mac OS) + else + AC_DEFINE(wxUSE_POPUPWIN) + USES_CONTROLS=1 + fi +fi + if test "$USES_CONTROLS" = 1; then AC_DEFINE(wxUSE_CONTROLS) fi @@ -4208,10 +4377,10 @@ dnl --------------------------------------------------------------------------- dnl misc options dnl --------------------------------------------------------------------------- -dnl TODO this is unused for now... -dnl if test "$wxUSE_WXTREE" = "yes"; then -dnl AC_DEFINE(wxUSE_WXTREE) -dnl fi +if test "$wxUSE_TREELAYOUT" = "yes"; then + AC_DEFINE(wxUSE_TREELAYOUT) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS treelay" +fi if test "$wxUSE_DRAGIMAGE" = "yes"; then AC_DEFINE(wxUSE_DRAGIMAGE) @@ -4231,6 +4400,10 @@ if test "$wxUSE_MIMETYPE" = "yes"; then AC_DEFINE(wxUSE_MIMETYPE) fi +if test "$wxUSE_SYSTEM_OPTIONS" = "yes"; then + AC_DEFINE(wxUSE_SYSTEM_OPTIONS) +fi + if test "$wxUSE_MINIFRAME" = "yes"; then AC_DEFINE(wxUSE_MINIFRAME) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS minifram" @@ -4283,6 +4456,10 @@ if test "$wxUSE_FILEDLG" = "yes"; then AC_DEFINE(wxUSE_FILEDLG) fi +if test "$wxUSE_FINDREPLDLG" = "yes"; then + AC_DEFINE(wxUSE_FINDREPLDLG) +fi + if test "$wxUSE_FONTDLG" = "yes"; then AC_DEFINE(wxUSE_FONTDLG) fi @@ -4315,6 +4492,10 @@ if test "$wxUSE_PROGRESSDLG" = "yes"; then fi fi +if test "$wxUSE_SPLASH" = "yes"; then + AC_DEFINE(wxUSE_SPLASH) +fi + if test "$wxUSE_STARTUP_TIPS" = "yes"; then if test "$wxUSE_CONSTRAINTS" != "yes"; then AC_MSG_WARN(Startup tips requires constraints and won't be compiled without them) @@ -4347,6 +4528,18 @@ fi AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO) +dnl --------------------------------------------------------------------------- +dnl define the variable containing the installation prefix (used in dcpsg.cpp) +dnl --------------------------------------------------------------------------- + +if test "x$prefix" != "xNONE"; then + wxPREFIX=$prefix +else + wxPREFIX=$ac_default_prefix +fi + +AC_DEFINE_UNQUOTED(wxINSTALL_PREFIX, "$wxPREFIX") + dnl --------------------------------------------------------------------------- dnl Output the makefiles and such from the results found above dnl --------------------------------------------------------------------------- @@ -4359,7 +4552,7 @@ dnl dnl note that we always link with -lm except for Mac OS X dnl extended.c uses floor() and is always linked in EXTRA_LIBS="$LIBS $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK $ZLIB_LINK -lm" -if test "$USE_MAC" = 1 ; then +if test "$wxUSE_MAC" = 1 ; then EXTRA_LIBS="$EXTRA_LIBS -framework Carbon -framework System" fi if test "$wxUSE_GUI" = "yes"; then @@ -4371,7 +4564,9 @@ dnl makefile system without libtool LD_LIBS="\${top_builddir}/lib/${WX_LIBRARY_NAME_STATIC} $EXTRA_LIBS" dnl all -I options we must pass to the compiler -INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE $FREETYPE_INCLUDE $TOOLKIT_INCLUDE" +INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include \ +$REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE \ +$FREETYPE_INCLUDE $TOOLKIT_INCLUDE" dnl wxGTK does not need TOOLKIT includes in wx-config if test "$wxUSE_GTK" = 1; then @@ -4399,10 +4594,10 @@ if test "$wxUSE_GUI" = "yes"; then dnl library features they need are present) dnl TODO some samples are never built so far: - dnl ipc, mfc, nativdlg, oleauto, ownerdrw, proplist + dnl ipc, mfc, nativdlg, oleauto, ownerdrw SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS controls dialogs \ - drawing dynamic event font fractal image \ - minimal richedit widgets" + drawing dynamic erase event exec font image \ + minimal richedit rotate widgets" if test "$wxUSE_UNIVERSAL" = "yes" ; then SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS univ" @@ -4411,7 +4606,7 @@ if test "$wxUSE_GUI" = "yes"; then dnl this is needed to be able to find AFM files CPPFLAGS="$CPPFLAGS \$(EXTRADEFS) \$(APPEXTRADEFS)" else - SAMPLES_SUBDIRS="" + SAMPLES_SUBDIRS="console" fi dnl for convenience, sort the samples in alphabetical order @@ -4507,6 +4702,7 @@ AC_SUBST(OPENGL_LIBS) AC_SUBST(EXTRADEFS) AC_SUBST(LIBS) AC_SUBST(LD_LIBS) +AC_SUBST(WXMSW_DLL_DEFINES) dnl additional resurces settings AC_SUBST(RCINPUTSWITCH) @@ -4556,11 +4752,12 @@ if test "$wxUSE_GUI" = "yes"; then wx_cv_path_ifs=$PATH_IFS wx_cv_program_ext=$PROGRAM_EXT wx_cv_target_library=$WX_TARGET_LIBRARY + wx_cv_target_library_gl=$WX_TARGET_LIBRARY_GL wx_cv_target_libtype=$WX_TARGET_LIBRARY_TYPE dnl we need to export them because passing them through cache won't dnl work when cache=/dev/null (which is default for autoconf 2.50) export wx_cv_path_samplesubdirs wx_cv_path_ifs wx_cv_program_ext \ - wx_cv_target_library wx_cv_target_libtype + wx_cv_target_library wx_cv_target_library_gl wx_cv_target_libtype AC_CONFIG_SUBDIRS(demos samples utils contrib) fi dnl from wxUSE_GUI