+ if test "$wxUSE_LIBJPEG" = "builtin" ; then
+ JPEG_INCLUDE="-I\${top_srcdir}/src/jpeg"
+ fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl Check for tiff library
+dnl ------------------------------------------------------------------------
+
+TIFF_INCLUDE=
+TIFF_LINK=
+if test "$wxUSE_LIBTIFF" != "no" ; then
+ AC_DEFINE(wxUSE_LIBTIFF)
+
+ if test "$wxUSE_LIBTIFF" = "sys" -o "$wxUSE_LIBTIFF" = "yes" ; then
+ AC_CHECK_HEADER(tiffio.h,
+ AC_CHECK_LIB(tiff, TIFFError,
+ TIFF_LINK="-ltiff",
+ ,
+ -lm)
+ )
+
+ if test "x$TIFF_LINK" = "x" ; then
+ if test "$wxUSE_LIBTIFF" = "sys" ; then
+ AC_MSG_ERROR([system tiff library not found! Use --with-libtiff=builtin to use built-in version])
+ else
+ AC_MSG_WARN([system tiff library not found, will compile built-in version instead])
+ wxUSE_LIBTIFF=builtin
+ fi
+ else
+ dnl we are using the system library
+ wxUSE_LIBTIFF=sys
+ fi
+ fi
+
+ if test "$wxUSE_LIBTIFF" = "builtin" ; then
+ TIFF_INCLUDE="-I\${top_srcdir}/src/tiff"
+ fi
+fi
+
+dnl ------------------------------------------------------------------------
+dnl Check for freetype library
+dnl ------------------------------------------------------------------------
+
+FREETYPE_INCLUDE=
+FREETYPE_LINK=
+if test "$wxUSE_FREETYPE" != "no" ; then
+ AC_DEFINE(wxUSE_FREETYPE)
+
+ if test "$wxUSE_FREETYPE" = "sys" -o "$wxUSE_FREETYPE" = "yes" ; then
+ AC_CHECK_HEADER(freetype.h,
+ AC_CHECK_LIB(freetype, FT_Render_Glyph,
+ FREETYPE_LINK="-lfreetype",
+ ,
+ [-lm])
+ )
+
+ if test "x$FREETYPE_LINK" = "x" ; then
+ if test "$wxUSE_FREETYPE" = "sys" ; then
+ AC_MSG_ERROR([system freetype library not found! Use --with-freetype=builtin to use built-in version])
+ else
+ AC_MSG_WARN([system freetype library not found, will compile built-in version instead])
+ wxUSE_FREETYPE=builtin
+ fi
+ else
+ dnl we are using the system library
+ wxUSE_FREETYPE=sys
+ fi
+ fi
+
+ if test "$wxUSE_FREETYPE" = "builtin" ; then
+ FREETYPE_INCLUDE="-I\${top_srcdir}/src/freetype"
+ fi
+fi
+
+dnl ----------------------------------------------------------------
+dnl search for toolkit (widget sets)
+dnl ----------------------------------------------------------------
+
+AFMINSTALL=
+
+TOOLKIT=
+TOOLKIT_INCLUDE=
+WIDGET_SET=
+
+dnl are we building for a win32 target environment?
+dnl If so, setup common stuff needed for both GUI and Base libs.
+if test "$USE_WIN32" = 1 ; then
+ AC_CHECK_HEADERS(w32api.h)
+ AC_CHECK_HEADER(windows.h, [],
+ [
+ AC_MSG_ERROR(please set CFLAGS to contain the location of windows.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 <w32api.h>],
+ [
+ #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
+ ])
+ ])
+
+ 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"
+
+ dnl Cygwin doesn't link these by default
+ if test "$wxUSE_CYGWIN" = 1; then
+ LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32"
+ fi
+
+ dnl add extra odbc libs if we have compiled in odbc
+ if test "$wxUSE_ODBC" = "yes" ; then
+ LIBS="$LIBS -lodbc32 -lole32 -loleaut32"
+ fi
+
+ dnl -mwindows is needed to avoid that spawning of a console window
+ dnl This probably doesn't belong here.. The user may actually *want*
+ dnl a console window. People should add this to their own app makefiles
+ dnl instead. Unless someone cries murder about it, expect this to
+ dnl disappear from here soon.
+ if test "$wxUSE_MINGW" = 1; then
+ LDFLAGS="$LDFLAGS -mwindows"
+ fi
+
+ RESFLAGS="--include-dir \$(top_srcdir)/include --include-dir \$(top_srcdir)/\$(program_dir) --define __WIN32__ --define __WIN95__ --define __GNUWIN32__"
+ RESPROGRAMOBJ="\$(PROGRAM)_resources.o"
+fi