#include <gtk/gtk.h>
#include <gtk/gtkfeatures.h>
#include <stdio.h>
+#include <stdlib.h>
int
main ()
WX_ARG_SYS_WITH(libpng, [ --with-libpng use libpng (PNG image format)], wxUSE_LIBPNG)
WX_ARG_SYS_WITH(libjpeg, [ --with-libjpeg use libjpeg (JPEG file format)], wxUSE_LIBJPEG)
-WX_ARG_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
+WX_ARG_SYS_WITH(libtiff, [ --with-libtiff use libtiff (TIFF file format)], wxUSE_LIBTIFF)
WX_ARG_WITH(opengl, [ --with-opengl use OpenGL (or Mesa)], wxUSE_OPENGL)
fi
dnl cross-compiling support: we're cross compiling if the build system is
dnl different from the target one (assume host and target be always the same)
-if eval "test $host != $build"; then
- if eval "test $host_alias != NONE"; then
+if test "$cross_compiling" = "yes" ; then
CC=$host_alias-gcc
CXX=$host_alias-c++
AR=$host_alias-ar
RANLIB=$host_alias-ranlib
DLLTOOL=$host_alias-dlltool
+ RESCOMP=$host_alias-windres
LD=$host_alias-ld
NM=$host_alias-nm
STRIP=$host_alias-strip
- fi
fi
dnl C-compiler checks
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"
+ 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
if test "$wxUSE_MINGW" = 1; then
LDFLAGS="$LDFLAGS -mwindows"
GENERICOBJS="\$(MSW_GENERICOBJS)"
UNIXOBJS=
GUIDIST=MSW_DIST
+
+ dnl we should calculate these
+ RCINCSWITCH="--include-dir"
+ RCDEFSWITCH="--define"
+ RCPREPROCESSOR="--preprocessor \"\$(CC) -c -E -xc-header -DRC_INVOKED\""
+ RCINPUTSWITCH="-i"
+ RCOUTPUTSWITCH="-o"
+ RESFLAGS="$RCPREPROCESSOR $RCINCSWITCH \$(top_srcdir)/include $RCINCSWITCH \$(top_srcdir)/\$(program_dir) $RCDEFSWITCH __WIN32__ $RCDEFSWITCH __WIN95__ $RCDEFSWITCH __GNUWIN32__"
+
+ dnl set optinal RES_PROGRAM_OPT to RES_PROGRAM
+ RESPROGRAM="\$(RES_PROGRAM)"
+
fi
if test "$wxUSE_GTK" = 1; then
[-lz -lm])
)
if test "x$PNG_LINK" = "x" ; then
- AC_MSG_ERROR(system png library not found! Use --with-png=yes to use built-in libpng)
+ AC_MSG_ERROR(system png library not found! Use --with-libpng=yes to use the built-in libpng)
fi
fi
JPEG_LINK=
AC_CHECK_HEADER(jpeglib.h, AC_CHECK_LIB(jpeg, jpeg_read_header, JPEG_LINK="-ljpeg"))
if test "x$JPEG_LINK" = "x" ; then
- AC_MSG_ERROR(system jpeg library not found! Use --with-jpeg=yes to use built-in one)
+ AC_MSG_ERROR(system jpeg library not found! Use --with-libjpeg=yes to use the built-in one)
fi
fi
fi
TIFF_INCLUDE=
-if test "$wxUSE_LIBTIFF" = "yes" ; then
+if test "$wxUSE_LIBTIFF" = "yes" -o "$wxUSE_LIBTIFF" = "sys" ; then
AC_DEFINE(wxUSE_LIBTIFF)
- TIFF_INCLUDE="-I\${top_srcdir}/src/tiff"
+ if test "$wxUSE_LIBTIFF" = "yes" ; then
+ TIFF_INCLUDE="-I\${top_srcdir}/src/tiff"
+ else
+ TIFF_LINK=
+ AC_CHECK_HEADER(tiffio.h, AC_CHECK_LIB(tiff, TIFFError,
+ TIFF_LINK="-ltiff",
+ ,
+ -lm))
+ if test "x$TIFF_LINK" = "x" ; then
+ AC_MSG_ERROR(system tiff library not found! Use --with-libtiff=yes to use the built-in one)
+ fi
+ fi
fi
if test "$wxUSE_OPENGL" = "yes"; then
dnl get the string with OS info - used by wxGetOsDescription()
dnl ---------------------------------------------------------------------------
-OSINFO=`uname -s -r -m`
-OSINFO="\"$OSINFO\""
+if test "$cross_compiling" = "yes"; then
+ dnl Use best guess from host as we can't use uname when cross compiling
+ OSINFO="\"$host\""
+else
+ dnl attualy work out OS version
+ OSINFO=`uname -s -r -m`
+ OSINFO="\"$OSINFO\""
+fi
+
AC_DEFINE_UNQUOTED(WXWIN_OS_DESCRIPTION, $OSINFO)
dnl ---------------------------------------------------------------------------
dnl all additional libraries (except wxWindows itself) we link with
EXTRA_LIBS="$LIBS $ZLIB_LINK $POSIX4_LINK $INET_LINK $WCHAR_LINK $THREADS_LINK $DMALLOC_LINK $DL_LINK"
if test "$wxUSE_GUI" = "yes"; then
- EXTRA_LIBS="$EXTRA_LIBS $GUILIBS $PNG_LINK $JPEG_LINK"
+ EXTRA_LIBS="$EXTRA_LIBS $GUILIBS $PNG_LINK $JPEG_LINK $TIFF_LINK"
fi
dnl all the libraries needed to link wxWindows programs when using the
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 $TOOLKIT_INCLUDE"
+INCLUDES="-I. -I\${top_builddir}/include -I\${top_srcdir}/include -I\${top_srcdir}/contrib/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
AC_SUBST(LIBS)
AC_SUBST(LD_LIBS)
+dnl additional resurces settings
+AC_SUBST(RCINPUTSWITCH)
+AC_SUBST(RCOUTPUTSWITCH)
+AC_SUBST(RESPROGRAM)
+AC_SUBST(RESCOMP)
+AC_SUBST(RESFLAGS)
+
+dnl These seam to be missing
+AC_SUBST(DLLTOOL)
+AC_SUBST(AS)
+AC_SUBST(NM)
+AC_SUBST(LD)
+AC_SUBST(MAKEINFO)
+
+
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
dnl - and we do use it)
dnl some more GUI only things
if test "$wxUSE_GUI" = "yes"; then
- dnl we need to pass SAMPLES_SUBDIRS to the configure in
+ dnl we need to pass SAMPLES_SUBDIRS (and some other) to the configure in
dnl samples and the only way to do it is, again, use the cache
wx_cv_path_samplesubdirs=$SAMPLES_SUBDIRS
- AC_CONFIG_SUBDIRS(demos samples utils)
+ wx_cv_path_ifs=$PATH_IFS
+ wx_cv_program_ext=$PROGRAM_EXT
+ wx_cv_target_library=$WX_TARGET_LIBRARY
+ AC_CONFIG_SUBDIRS(demos samples utils contrib)
fi
dnl from wxUSE_GUI