dnl adds -traditional for gcc if needed
AC_PROG_GCC_TRADITIONAL
-dnl do all checks from now on using the C++ compiler: this saves us a lot of
-dnl problems with various functions which may be available in libc but not
-dnl declared in the header and various pointer conversions which compile with
-dnl the C compiler but not in C++
-AC_LANG_PUSH(C++)
-
dnl C++-compiler checks
dnl defines CXX with the compiler to use
dnl defines GXX with yes if using gxx
dnl not "g++/c++".
dnl ---------------------------------------------------------------------
dnl (OS/2-only piece)
- AC_LANG_PUSH(C)
if test "$wxUSE_MOTIF" = 1 -o "$wxUSE_GTK" = 1 -o "$wxUSE_X11" = 1; then
dnl More complete Unix emulation for unix-like ports
dnl by linking in POSIX/2's cExt (if available).
wx_cv_gccversion="EMX2"
)
])
- AC_LANG_POP
if test "$wx_cv_gccversion" = "EMX2"; then
LIBS="$LIBS -lstdcpp"
LDFLAGS="$LDFLAGS -Zsysv-signals"
dnl Check for headers
dnl ------------------------------------------------------------------------
-dnl defines HAVE_STDLIB_H
-AC_CHECK_HEADERS(stdlib.h)
-dnl defines HAVE_MALLOC_H
-AC_CHECK_HEADERS(malloc.h)
-dnl defines HAVE_UNISTD_H
-AC_CHECK_HEADERS(unistd.h)
-dnl defines HAVE_WCHAR_H
-AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h)
dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
if test "$ac_cv_header_wchar_h" != "yes"; then
- dnl defines HAVE_WCSTR_H
AC_CHECK_HEADERS(wcstr.h)
fi
-dnl defines HAVE_FNMATCH_H
-AC_CHECK_HEADERS(fnmatch.h)
-
-dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
-AC_CHECK_HEADERS(langinfo.h)
-
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
dnl Explicitly link -lintl if langinfo.h is available
dnl check for C99 string to long long conversion functions, assume that if we
dnl have the unsigned variants, then we have the signed ones as well
if test "wxUSE_UNICODE" = "yes"; then
- AC_CHECK_FUNCS(wcstoull)
+ WX_CHECK_FUNCS(wcstoull)
else
- AC_CHECK_FUNCS(strtoull)
+ WX_CHECK_FUNCS(strtoull)
fi
dnl ---------------------------------------------------------------------------
if test "$wxUSE_GTK" = 1; then
dnl GTK+ test program must be compiled with C compiler
- AC_LANG_PUSH(C)
-
AC_MSG_CHECKING([for GTK+ version])
gtk_version_cached=1
AC_CHECK_LIB(gdk, gdk_im_open, AC_DEFINE(HAVE_XIM))
fi
- AC_LANG_POP
-
dnl we need poll() in src/gtk/app.cpp (we know that Darwin doesn't
dnl have it but we do the check for the others)
if test "$USE_DARWIN" != 1; then
else
dnl adjust CPPFLAGS to include GL/gl.h location if necessary
dnl (/opt/graphics/OpenGL is for HP-UX systems, bug 925307)
+ AC_MSG_CHECKING([for OpenGL headers])
WX_PATH_FIND_INCLUDES([$SEARCH_INCLUDE /opt/graphics/OpenGL/include], GL/gl.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found in $ac_find_includes)
WX_INCLUDE_PATH_EXIST($ac_find_includes, $CPPFLAGS)
CPPFLAGS="$ac_path_to_include $CPPFLAGS"
+ else
+ AC_MSG_RESULT([not found])
fi
- AC_CHECK_HEADER(GL/gl.h,
- [
+ AC_CHECK_HEADER(GL/gl.h, [
+ AC_CHECK_HEADER(GL/glu.h, [
found_gl=0
AC_MSG_CHECKING([for -lGL])
fi
fi
])
+ ])
if test "x$OPENGL_LIBS" = "x"; then
dnl it should be an error and not a warning because OpenGL is not on
dnl succeeds, even with C++ compiler, but the compilation of wxWidgets fails
dnl
dnl so we first check if the function is in the library
+dnl
+dnl FIXME: replace this mess with WX_CHECK_FUNCS()
AC_CHECK_FUNCS(snprintf vsnprintf)
if test "$ac_cv_func_vsnprintf" = "yes"; then
fi
fi
- dnl also look if we have wide char IO functions
- AC_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf)
+ dnl also look if we have wide char IO functions, notice that [f]putws are
+ dnl declared in special widec.h under Solaris
+ wchar_headers="#include <stdio.h>
+#include <wchar.h>"
+ case "${host}" in
+ *-*-solaris2* )
+ AC_CHECK_HEADERS(widec.h)
+ if test "$ac_cv_header_widec_h" = "yes"; then
+ wchar_headers="$wchar_headers
+#include <widec.h>"
+ fi
+ esac
+
+ WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,,
+ [$wchar_headers])
dnl MinGW has a vswprintf with a different prototype, and
dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS
fi
if test "x$ac_cv_header_fnmatch_h" = "xyes"; then
- AC_CHECK_FUNCS(fnmatch)
+ WX_CHECK_FUNCS(fnmatch)
fi
if test "$wxUSE_FILE" = "yes"; then
- AC_CHECK_FUNCS(fsync)
-fi
-
-AC_CHECK_FUNCS(round)
-if test "$ac_cv_func_round" = yes; then
- AC_CHECK_DECLS(round,,,[#include <math.h>])
+ WX_CHECK_FUNCS(fsync)
fi
+WX_CHECK_FUNCS(round,,,[#include <math.h>])
dnl the following tests are for Unix(like) systems only
if test "$TOOLKIT" != "MSW"; then
POSIX4_LINK=" -lposix4"
],
[
- AC_CHECK_FUNCS(usleep,
- AC_DEFINE(HAVE_USLEEP),
- AC_MSG_WARN([wxSleep() function will not work])
+ WX_CHECK_FUNCS(usleep,,
+ AC_MSG_WARN([wxSleep() function will not work])
)
]
)
fi
dnl check for uname (POSIX) and gethostname (BSD)
-AC_CHECK_FUNCS(uname gethostname, break)
+WX_CHECK_FUNCS(uname gethostname, break)
WX_CHECK_FUNCS(strtok_r, [], [], [#define _REENTRANT])
WITH_PLUGIN_SDL=1
fi
fi
+ else
+ dnl wxMGL doesn't support sound under DOS, only under Unix
+ if test "$wxUSE_MGL" = 1; then
+ AC_MSG_WARN([wxSound not supported in MGL under DOS... disabled])
+ wxUSE_SOUND="no"
+ fi
fi
+fi
+if test "$wxUSE_SOUND" = "yes"; then
AC_DEFINE(wxUSE_SOUND)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS sound"
fi
dnl joystick support is only for Linux 2.1.x or greater
else
- AC_CHECK_HEADERS(linux/joystick.h, wxUSE_JOYSTICK=yes)
+ dnl wxJoystick not supported by wxMGL at all
+ if test "$wxUSE_MGL" != "1"; then
+ AC_CHECK_HEADERS(linux/joystick.h, wxUSE_JOYSTICK=yes)
+ fi
fi
if test "$wxUSE_JOYSTICK" = "yes"; then
fi
if test "$wxUSE_DIALUP_MANAGER" = "yes"; then
- if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 ; then
- AC_MSG_WARN([Dialup manager not yet supported under Mac OS X... disabled])
+ if test "$wxUSE_MAC" = 1 -o "$wxUSE_COCOA" = 1 -o "$wxUSE_MGL" = 1; then
+ AC_MSG_WARN([Dialup manager not supported on this platform... disabled])
else
AC_DEFINE(wxUSE_DIALUP_MANAGER)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dialup"
dnl Output the makefiles and such from the results found above
dnl ---------------------------------------------------------------------------
-dnl no more tests from here
-AC_LANG_POP
-
dnl all additional libraries (except wxWidgets itself) we link with
if test "$wxUSE_MAC" = 1 ; then
[ chmod +x lib/wx/config/inplace-${TOOLCHAIN_FULLNAME} ],
[ TOOLCHAIN_FULLNAME="${TOOLCHAIN_FULLNAME}" ])
-AC_CONFIG_FILES([ version-script Makefile ])
+if test "$wx_cv_version_script" = "yes"; then
+ AC_CONFIG_FILES(version-script)
+fi
+AC_CONFIG_FILES(Makefile)
AC_CONFIG_COMMANDS([wx-config],
[ rm -f wx-config
dnl Add tests to the list of subdirs if cppunit 1.8.0+ is detected
AM_PATH_CPPUNIT(1.8.0, [SUBDIRS="$SUBDIRS tests"])
+if test "$USE_UNIX" != "1" -a "$USE_WIN32" != "1"; then
+ DISABLED_CONTRIB="$DISABLED_CONTRIB net"
+fi
+
for subdir in `echo $SUBDIRS`; do
if test -d ${srcdir}/${subdir} ; then
if test "$wxUSE_GUI" = "yes"; then