fi
done
else
- AC_MSG_RESULT(base ($host_alias hosted) only)
+ if test "x$host_alias" != "x"; then
+ AC_MSG_RESULT(base ($host_alias hosted) only)
+ else
+ AC_MSG_RESULT(base only)
+ fi
fi
dnl ---------------------------------------------------------------------------
dnl --- FIXME: This is still a somewhat random list of libs,
dnl --- some of them should probably be included conditionally.
- LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -ladvapi32 -lwsock32"
+ LIBS="$LIBS -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32"
if test "$wxUSE_ACCESSIBILITY" = "yes" ; then
LIBS="$LIBS -loleacc"
case "${host}" in
*-*-cygwin* )
dnl Cygwin doesn't include these by default
- LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32"
+ LIBS="$LIBS -lkernel32 -luser32"
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -D__WIN95__"
esac
if test "$wxUSE_MSW" = 1 ; then
TOOLKIT=MSW
GUIDIST=MSW_DIST
-
- dnl -mwindows causes a heap of other default gui libs to be linked in.
- dnl All platforms need this, except maybe cygwin
- LDFLAGS="$LDFLAGS -Wl,--subsystem,windows -mwindows"
fi
if test "$wxUSE_GTK" = 1; then
PKG_CHECK_MODULES(PANGOFT2, pangoft2,
[
CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
- LIBS="$LIBS $PANGOFT2_LIBS"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
],
[
AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
fi
TOOLKIT_INCLUDE="$wx_cv_cflags_gtk"
- GUI_TK_LIBRARY="$wx_cv_libs_gtk"
+ GUI_TK_LIBRARY="$wx_cv_libs_gtk $GUI_TK_LIBRARY"
AFMINSTALL=afminstall
TOOLKIT=GTK
PKG_CHECK_MODULES(PANGOX, pangox,
[
CXXFLAGS="$CXXFLAGS $PANGOX_CFLAGS"
- LIBS="$LIBS $PANGOX_LIBS"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOX_LIBS"
],
[
AC_MSG_ERROR([pangox library not found, library cannot be compiled in Unicode mode])
PKG_CHECK_MODULES(PANGOFT2, pangoft2,
[
CXXFLAGS="$CXXFLAGS $PANGOFT2_CFLAGS"
- LIBS="$LIBS $PANGOFT2_LIBS"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOFT2_LIBS"
],
[
AC_MSG_WARN([pangoft2 library not found, library will be compiled without printing support])
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
[
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
- LIBS="$LIBS $PANGOXFT_LIBS"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
],
[
AC_MSG_WARN([pangoxft library not found, library will be compiled without anti-aliasing support])
if test "$wxUSE_SHARED" = "yes"; then
SHARED=1
- dnl install targets
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS CREATE_INSTALLED_LINKS_GL"
- WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1} \$(build_libdir)/${WX_LIBRARY_LINK1_GL}"
- else
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
- WX_ALL="\$(build_libdir)/${WX_LIBRARY_LINK1}"
- 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 use versioned symbols if available on the platform
WX_VERSIONED_SYMBOLS([\$(top_builddir)version-script])
- 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 -o flag must be after PIC flag
- SHARED_LD="${CXX} -shared ${PIC_FLAG} -o"
- else
- dnl no idea why it wants it, but it does
- LDFLAGS="$LDFLAGS -L/usr/lib"
-
- SHARED_LD="${CXX} -b -o"
- PIC_FLAG="+Z"
- fi
-
- dnl install shared libs without symlinks
- if test "$wxUSE_OPENGL" = "yes"; then
- WX_ALL_INSTALLED="preinstall_gl"
- WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_GL}"
- else
- WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
- fi
- ;;
-
*-*-linux* | *-*-gnu* )
- 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
-
SAMPLES_RPATH_FLAG="-Wl,-rpath,\$(top_builddir)lib"
;;
fi
;;
- *-*-darwin* )
- dnl For Unix to MacOS X porting instructions, see:
- dnl http://fink.sourceforge.net/doc/porting/porting.html
- TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXMAKINGDLL"
- CFLAGS="$CFLAGS -fno-common"
- CXXFLAGS="$CXXFLAGS -fno-common"
- dnl wxWindows must be fully binded (lazy binding breaks RTTI classinfo)
- dnl this can be done either with the exe linker flag -Wl,-bind_at_load
- dnl or with a double stage link in order to create a single module
- dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved
- SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o"
- PIC_FLAG="-dynamic -fPIC"
- ;;
-
- *-*-aix* )
- dnl default settings are ok for gcc
- if test "$GCC" != "yes"; then
- dnl the abs path below used to be hardcoded here so I guess it must
- dnl be some sort of standard location under AIX?
- AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
- makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
-
- SHARED_LD="$(AIX_CXX_LD) -p 0 -o"
- fi
- ;;
-
*-*-cygwin* | *-*-mingw32* )
- WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a"
-
- SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o"
- TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
-
- PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
-
dnl Don't build seperate GL library
WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
LIBS="${LIBS} ${OPENGL_LIBS}"
fi
;;
-
- *-*-beos* )
- dnl can't use gcc under BeOS for shared library creation because it
- dnl complains about missing 'main'
- SHARED_LD="${LD} -shared -o"
- ;;
-
- *-*-irix* )
- dnl default settings are ok for gcc
- if test "$GCC" != "yes"; then
- PIC_FLAG="-KPIC"
- fi
- ;;
-
- *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
- *-*-sunos4* | \
- *-*-osf* | \
- *-*-dgux5* | \
- *-*-sysv5* )
- dnl defaults are ok
- ;;
-
- *)
- AC_MSG_ERROR(unknown system type $host.)
esac
dnl set target to shared if not explicitly chose static before
if test "$wxUSE_HTML" = "yes"; then
AC_DEFINE(wxUSE_HTML)
- SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html htlbox"
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS html html/about html/help html/helpview html/printing html/test html/virtual html/widget html/zip htlbox"
fi
if test "$wxUSE_VALIDATORS" = "yes"; then
if test "$wxUSE_GUI" = "yes"; then
- LIBS="$GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LIBS"
-
dnl TODO add checks that these samples will really compile (i.e. all the
dnl library features they need are present)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS artprov controls dialogs \
drawing dynamic erase event exec font image \
minimal propsize rotate shaped widgets"
+
+ if test "$wxUSE_MONOLITHIC" != "yes"; then
+ SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS console"
+ fi
else
SAMPLES_SUBDIRS="console"
fi
$REGEX_INCLUDE $ZLIB_INCLUDE $PNG_INCLUDE $JPEG_INCLUDE $TIFF_INCLUDE \
$TOOLKIT_INCLUDE"
+dnl C/C++ compiler options used to compile wxWindows
+if test "$GXX" = yes ; then
+ dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
+ CXXWARNINGS="-Wall"
+ dnl should enable this one day...
+ dnl CXXWARNINGS="-Wall -Werror"
+fi
+
+EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE"
+
+dnl remove the extra white space from the cc/c++/ld options
+CPPFLAGS=`echo $WXDEBUG_DEFINE $INCLUDES $CPPFLAGS | sed 's/ \\+/ /g'`
+CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'`
+CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS | sed 's/ \+/ /g'`
+
+
+LIBS=`echo $LIBS | sed 's/ \+/ /g'`
+EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
+if test "$wxUSE_GUI" = "yes"; then
+ EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK | sed 's/ \+/ /g'`
+fi
+
+LDFLAGS="$LDFLAGS $PROFILE"
+
dnl wxGTK does not need TOOLKIT includes in wx-config
if test "$wxUSE_GTK" = 1; then
WXCONFIG_INCLUDE=
AC_SUBST(wxUSE_LIBPNG)
AC_SUBST(wxUSE_LIBTIFF)
-EXTRALIBS="$LDFLAGS $LDFLAGS_VERSIONING $LIBS $DMALLOC_LIBS"
-
if test $wxUSE_MONOLITHIC = "yes" ; then
MONOLITHIC=1
else
MONOLITHIC=0
fi
+dnl FIXME -- make configurable!
+VENDOR="custom"
+OFFICIAL_BUILD=0
+AC_SUBST(VENDOR)
+AC_SUBST(OFFICIAL_BUILD)
+
AC_SUBST(WXUNIV)
AC_SUBST(MONOLITHIC)
AC_SUBST(EXTRALIBS)
+AC_SUBST(EXTRALIBS_GUI)
AC_SUBST(UNICODE)
AC_SUBST(BUILD)
AC_SUBST(SHARED)
AC_BAKEFILE
-dnl C/C++ compiler options used to compile wxWindows
-if test "$GXX" = yes ; then
- dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
- CXXWARNINGS="-Wall"
- dnl should enable this one day...
- dnl CXXWARNINGS="-Wall -Werror"
-fi
-
-EXTRA_CFLAGS="$WXDEBUG $WXODBCFLAG $PROFILE $OPTIMISE"
-
-dnl remove the extra white space from the cc/c++/ld options
-CPPFLAGS=`echo $INCLUDES $CPPFLAGS | sed 's/ \\+/ /g'`
-CFLAGS=`echo $EXTRA_CFLAGS $CFLAGS $CXXWARNINGS | sed 's/ \\+/ /g'`
-CXXFLAGS=`echo $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS | sed 's/ \+/ /g'`
-LIBS=`echo $LIBS | sed 's/ \+/ /g'`
-LDFLAGS="$LDFLAGS $PROFILE"
dnl for convenience, sort the samples in alphabetical order
dnl
AC_SUBST(SHARED_LD)
AC_SUBST(PIC_FLAG)
-AC_SUBST(CODE_GEN_FLAGS)
-AC_SUBST(CODE_GEN_FLAGS_CXX)
AC_SUBST(WX_TARGET_LIBRARY_TYPE)
AC_SUBST(WXCONFIG_INCLUDE)
AC_SUBST(WXCONFIG_RPATH)
AC_SUBST(WX_LARGEFILE_FLAGS)
+AC_SUBST(CODE_GEN_FLAGS)
+AC_SUBST(CODE_GEN_FLAGS_CXX)
dnl the list of files to compile/install
AC_SUBST(ALL_OBJECTS)
dnl Configure samples, contrib etc. directories, but only if they are present:
-for subdir in samples demos utils contrib ; do
+if test "$wxUSE_GUI" = "yes"; then
+ SUBDIRS="samples demos utils contrib"
+else dnl we build wxBase only
+ dnl there are no wxBase programs in contrib nor demos
+ SUBDIRS="samples utils"
+fi
+
+for subdir in `echo $SUBDIRS`; do
if test -d ${srcdir}/${subdir} ; then
- makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)`
+ if test "$wxUSE_GUI" = "yes"; then
+ if test ${subdir} = "samples"; then
+ dnl only take those samples which compile in the current
+ dnl configuration and which exist
+ for sample in `echo $SAMPLES_SUBDIRS`; do
+ if test -d $srcdir/samples/$sample; then
+ makefiles="samples/$sample/Makefile.in $makefiles"
+ fi
+ done
+ else dnl assume that everything compiles for utils &c
+ makefiles=`(cd $srcdir ; find $subdir -name Makefile.in)`
+ fi
+ else dnl we build wxBase only
+ dnl don't take all samples/utils, just those which build with
+ dnl wxBase
+ if test ${subdir} = "samples"; then
+ makefiles="samples/console/Makefile.in"
+ else dnl utils
+ makefiles="utils/HelpGen/Makefile.in \
+ utils/HelpGen/src/Makefile.in \
+ utils/makegen/Makefile.in"
+ fi
+ fi
+
for mkin in $makefiles ; do
mk=`echo $mkin | sed 's/Makefile\.in/Makefile/g'`
AC_CONFIG_FILES([$mk])