}
int main()
{
- return foo("hi", 17);
+ foo("hi", 17);
+ return 0;
}],
wx_cv_func_va_copy=yes,
wx_cv_func_va_copy=no
else
WX_LARGEFILE_FLAGS="-D_LARGE_FILES"
fi
+ dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
+ AC_FUNC_FSEEKO
+ if test "$ac_cv_sys_largefile_source" != no; then
+ WX_LARGEFILE_FLAGS="$WX_LARGEFILE_FLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
+ fi
CPPFLAGS="$CPPFLAGS $WX_LARGEFILE_FLAGS"
fi
dnl ------------------------------------------------------------------------
if test "$wxUSE_LIBMSPACK" != "no"; then
-
AC_CHECK_HEADER([mspack.h], [found_mspack_h=1])
if test "x$found_mspack_h" = "x1"; then
AC_CHECK_LIB(mspack, mspack_create_chm_decompressor,
fi
if test "x$MSPACK_LINK" = "x" ; then
wxUSE_LIBMSPACK=no
- else
- AC_DEFINE(wxUSE_LIBMSPACK)
fi
fi
+if test "$wxUSE_LIBMSPACK" != "no"; then
+ AC_DEFINE(wxUSE_LIBMSPACK)
+fi
+
dnl ----------------------------------------------------------------
dnl search for toolkit (widget sets)
)
PKG_CHECK_MODULES(PANGOXFT, pangoxft,
[
+ AC_DEFINE(HAVE_PANGO_XFT)
CXXFLAGS="$CXXFLAGS $PANGOXFT_CFLAGS"
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $PANGOXFT_LIBS"
],
dnl ---------------------------------------------------------------------------
dnl DirectDraw / Multimon for MSW
dnl ---------------------------------------------------------------------------
- AC_CHECK_HEADERS([multimon.h ddraw.h], [], [
- wxUSE_DISPLAY="no"
- AC_MSG_WARN([ddraw.h or multimon.h not found; disabling wxDisplay])
- ] )
+ AC_CHECK_HEADERS([multimon.h ddraw.h], [],
+ [
+ wxUSE_DISPLAY="no"
+ AC_MSG_WARN([ddraw.h or multimon.h not found; disabling wxDisplay])
+ ],
+ [#include <windows.h>])
fi
fi
dnl DirectShow MSW
dnl ---------------------------------------------------------------------------
wxUSE_DIRECTSHOW="yes"
- AC_CHECK_HEADERS([dshow.h], [], [
- wxUSE_DIRECTSHOW="no"
- AC_MSG_WARN([DirectShow not installed; consider installing the DirectX7 SDK or higher])
- ] )
+ AC_CHECK_HEADERS([dshow.h], [],
+ [
+ wxUSE_DIRECTSHOW="no"
+ AC_MSG_WARN([DirectShow not installed; consider installing the DirectX7 SDK or higher])
+ ],
+ [#include <windows.h>])
if test "$wxUSE_DIRECTSHOW" = "yes"; then
- AC_DEFINE(wxUSE_DIRECTSHOW)
- LIBS="$LIBS -lstrmiids"
+ AC_DEFINE(wxUSE_DIRECTSHOW)
+ LIBS="$LIBS -lstrmiids"
fi
fi
-
+
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS mediaplayer"
AC_DEFINE(wxUSE_MEDIACTRL)
fi
if test "x$GCC" != "xyes"; then
dnl see http://docs.hp.com/hpux/onlinedocs/2213/threads.htm
flag="$flag -D_RWSTD_MULTI_THREAD"
-
- dnl we also need -lcma for user threads (-lpthread is for
- dnl kernel threads only) according to Ian Brown
- LIBS="$LIBS -lcma"
fi
;;
*solaris* | alpha*-osf*)
dnl ---------------------------------------------------------------------------
if test "$wxUSE_GUI" = "yes"; then
- AC_DEFINE(wxUSE_GUI)
-
- dnl the things we always pull in the GUI version of the library:
- dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
- dnl library really can't be built without those)
- dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
- dnl almost any program and the first 2 are needed to show a message box
- dnl which want to be always able to do)
- dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
- dnl to compile without them (if the app doesn't do any drawing, it doesn't
- dnl need the dcs, pens, brushes, ...), this just can't be done now
- dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
- dnl 5. misc stuff: timers, settings, message box
-else
- AC_DEFINE(wxUSE_NOGUI)
+ AC_DEFINE(wxUSE_GUI)
+
+ dnl the things we always pull in the GUI version of the library:
+ dnl 1. basic things like wxApp, wxWindow, wxControl, wxFrame, wxDialog (the
+ dnl library really can't be built without those)
+ dnl 2. basic controls: wxButton, wxStaticText, wxTextCtrl (these are used in
+ dnl almost any program and the first 2 are needed to show a message box
+ dnl which want to be always able to do)
+ dnl 3. GDI stuff: icon, cursors and all that. Although it would be very nice
+ dnl to compile without them (if the app doesn't do any drawing, it doesn't
+ dnl need the dcs, pens, brushes, ...), this just can't be done now
+ dnl 4. menu stuff: wxMenu, wxMenuBar, wxMenuItem
+ dnl 5. misc stuff: timers, settings, message box
fi
dnl ---------------------------------------------------------------------------
PKG_CHECK_MODULES(LIBGNOMEPRINTUI,
[libgnomeprintui-2.2 >= 2.8],
[
- EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS"
+dnl EXTRALIBS_GNOMEPRINT="$LIBGNOMEPRINTUI_LIBS"
CXXFLAGS="$CXXFLAGS $LIBGNOMEPRINTUI_CFLAGS"
AC_DEFINE(wxUSE_LIBGNOMEPRINT)
],
else
AC_DEFINE_UNQUOTED(SOCKLEN_T, $wx_cv_type_getsockname3)
fi
+ dnl Do this again for getsockopt as it may be different
+ AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt],
+ wx_cv_type_getsockopt5,
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ socklen_t len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=socklen_t,
+ [
+ dnl the compiler will compile the version with size_t
+ dnl even if the real type of the last parameter is int
+ dnl but it should give at least a warning about
+ dnl converting between incompatible pointer types, so
+ dnl try to use it to get the correct behaviour at
+ dnl least with gcc (otherwise we'd always use size_t)
+ CFLAGS_OLD="$CFLAGS"
+ if test "$GCC" = yes ; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ size_t len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=size_t,
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ],
+ [
+ int len;
+ getsockopt(0, 0, 0, 0, &len);
+ ],
+ wx_cv_type_getsockopt5=int,
+ wx_cv_type_getsockopt5=unknown
+ )
+ )
+
+ CFLAGS="$CFLAGS_OLD"
+ ]
+ )
+ ])
+
+ if test "$wx_cv_type_getsockopt5" = "unknown"; then
+ wxUSE_SOCKETS=no
+ AC_MSG_WARN([Couldn't find socklen_t synonym for this system])
+ else
+ AC_DEFINE_UNQUOTED(SOCKOPTLEN_T, $wx_cv_type_getsockopt5)
+ fi
AC_LANG_POP
fi
fi
dnl C/C++ compiler options used to compile wxWidgets
if test "$GXX" = yes ; then
dnl CXXWARNINGS="-Wall -W -Wcast-qual -Werror"
- CXXWARNINGS="-Wall"
+ CWARNINGS="-Wall"
+ CXXWARNINGS="$CWARNINGS -Wno-ctor-dtor-privacy"
dnl should enable this one day...
dnl CXXWARNINGS="-Wall -Werror"
fi
dnl remove the extra white space from the cc/c++/ld options
CPPFLAGS=`echo $WXDEBUG_DEFINE $INCLUDES $CPPFLAGS`
-CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CXXWARNINGS`
+CFLAGS=`echo $CODE_GEN_FLAGS $EXTRA_CFLAGS $CFLAGS $CWARNINGS`
CXXFLAGS=`echo $CODE_GEN_FLAGS $CODE_GEN_FLAGS_CXX $EXTRA_CFLAGS $CXXFLAGS $CXXWARNINGS`
sanitised_bakefile_mess=`echo "$SHARED_LD_CXX" | tr -d '()'`
EXE_LINKER=`eval echo "$sanitised_bakefile_mess"`
+ dnl Need addtional flag on OS/2, so override bakefiles value
+ dnl (there currently is no suitable variable to which the
+ dnl missing flags could be added, AFAICS. SN, 18.12.2004. )
+ case "${host}" in
+ *-pc-os2_emx | *-pc-os2-emx )
+ SHARED_LD_CC="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
+ SHARED_LD_CXX="`pwd`/dllar.sh -name-mangler-script ./dllnames.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
+ cp -p ${srcdir}/src/os2/dllnames.sh .
+ cp -p ${srcdir}/src/os2/dllar.sh .
+ ;;
+ esac
else
dnl No bakefile support for static builds, but this should be ok for most.
fi
+dnl Check to see if the platform always requires NO_GCC_PRAGMA
GCC_PRAGMA_FLAGS=""
-dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
-if test $GCC_PCH = 1 ; then
- GCC_PRAGMA_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA"
-else
case "${host}" in
powerpc-*-darwin* )
dnl Some Apple's GCC version are broken and can't handle the
dnl pragmas:
GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
;;
- *-*-mingw32* | *-pc-os2_emx | *-pc-os2-emx )
- dnl MinGW and Innotek's GCC versions >= 3.2 have problems with
+ *-*-mingw32* )
+ dnl MinGW GCC versions >= 3.2 have problems with
dnl static member of classes derived from templates
dnl in combination with #pragma interface/implementation
dnl (the test case uses 4 files)
if test "$wxUSE_STL" = "yes" -o \
"$wxUSE_NO_EXCEPTIONS" != "yes" -o \
"$wxUSE_NO_RTTI" != "yes"; then
- AC_MSG_CHECKING([if this compiler version needs -DNO_GCC_PRAGMA])
+ AC_MSG_CHECKING([if this MinGW version needs -DNO_GCC_PRAGMA])
+ AC_TRY_COMPILE([],
+ [#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
+ #error "Not GCC 3.2 or greater"
+ #endif
+ ],
+ [GCC_PRAGMA_FLAGS="-DNO_GCC_PRAGMA"
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
+ fi
+ ;;
+ *-pc-os2_emx | *-pc-os2-emx )
+ dnl GCC versions ported to OS/2 have similar problems with
+ dnl static member of classes in combination with STL and
+ dnl pragma interface/implementation
+ if test "$wxUSE_STL" = "yes"; then
+ AC_MSG_CHECKING([if this gcc version needs -DNO_GCC_PRAGMA])
AC_TRY_COMPILE([],
[#if !(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2))
#error "Not GCC 3.2 or greater"
fi
;;
esac
+
+dnl Find out if we have to define NO_GCC_PRAGMA and WX_PRECOMP:
+PCH_FLAGS=""
+if test $GCC_PCH = 1 ; then
+ if test "x$GCC_PRAGMA_FLAGS" = "x"; then
+ PCH_FLAGS="-DWX_PRECOMP -DNO_GCC_PRAGMA"
+ else
+ PCH_FLAGS="-DWX_PRECOMP"
+ fi
fi
-CPPFLAGS="$GCC_PRAGMA_FLAGS $CPPFLAGS"
+
+CPPFLAGS="$PCH_FLAGS $GCC_PRAGMA_FLAGS $CPPFLAGS"
dnl for convenience, sort the samples in alphabetical order
echo " expat ${wxUSE_EXPAT}"
echo " libmspack ${wxUSE_LIBMSPACK}"
echo " sdl ${wxUSE_LIBSDL}"
-echo " gnomeprint ${wxUSE_LIBGNOMEPRINT}"
+echo " gnomeprint ${wxUSE_LIBGNOMEPRINT-none}"
echo ""