WX_VERSION=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER.$WX_RELEASE_NUMBER
WX_RELEASE=$WX_MAJOR_VERSION_NUMBER.$WX_MINOR_VERSION_NUMBER
+WX_MSW_VERSION=$WX_MAJOR_VERSION_NUMBER$WX_MINOR_VERSION_NUMBER$WX_RELEASE_NUMBER
+
WX_CURRENT=1
WX_REVISION=0
WX_AGE=0
dnl install checks
dnl defines INSTALL with the appropriate command
+AC_PROG_INSTALL
case "${host}" in
- dnl The other BSD's should probably go in here too, since this is
- dnl to workaround a strange static lib BSDism.
+ dnl The other BSD's should probably go in here too, since this is
+ dnl to workaround a strange static lib BSDism.
+ dnl Mac OS X install seems to ignore -p option...
powerpc-*-darwin* )
- INSTALL="cp -p"
- INSTALL_PROGRAM="cp -p"
- INSTALL_DATA="cp -p"
- AC_SUBST(INSTALL)
- AC_SUBST(INSTALL_PROGRAM)
- AC_SUBST(INSTALL_DATA)
+ INSTALL_PROGRAM="cp -fp"
+ INSTALL_DATA="cp -fp"
;;
*)
- AC_PROG_INSTALL
+ ;;
esac
dnl strip command
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,
+ dnl check if can use _WIN32_IE macro
+ AC_CACHE_CHECK([if w32api has good enough MSIE support], wx_cv_w32api_win32_ie,
[
AC_TRY_COMPILE([#include <w32api.h>],
[
#error You need w32api 1.1 or newer
#endif
], [
- wx_cv_w32api_win_ie=yes
- CPPFLAGS="$CPPFLAGS -D_WIN_IE=0x400"
+ wx_cv_w32api_win32_ie=yes
], [
- wx_cv_w32api_win_ie=no
+ wx_cv_w32api_win32_ie=no
])
])
+ if test "$wx_cv_w32api_win32_ie" = "yes" ; then
+ CPPFLAGS="$CPPFLAGS -D_WIN32_IE=0x400"
+ fi
dnl --- FIXME: This is still a somewhat random list of libs,
dnl --- some of them should probably be included conditionally.
dnl stupid GTK+ AM macros produce their own messages, so we
dnl have to pass to the next line
gtk_version_cached=0
- AC_MSG_RESULT("")
+ AC_MSG_RESULT()
wx_cv_lib_gtk=
if test "x$wxUSE_GTK2" = "xyes"; then
mgl_lib_type=""
if test "$wxUSE_DEBUG_FLAG" = yes ; then
- if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a ; then
+ if test -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.a -o \
+ -f $MGL_ROOT/lib/debug/$mgl_os/libmgl.so; then
mgl_lib_type=debug
fi
fi
if test "x$mgl_lib_type" = x ; then
- if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a ; then
+ if test -f $MGL_ROOT/lib/release/$mgl_os/libmgl.a -o \
+ -f $MGL_ROOT/lib/release/$mgl_os/libmgl.so; then
mgl_lib_type=release
else
AC_MSG_ERROR([Cannot find MGL libraries, make sure they are compiled.])
WX_LIBRARY="wx_${TOOLCHAIN_NAME}"
WX_LIBRARY_GL="wx_${TOOLCHAIN_NAME_GL}"
-dnl define which libs wx-config should link.
-WXCONFIG_LIBS="-l${WX_LIBRARY}"
-
-if test "$wxUSE_OPENGL" = "yes"; then
- WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS"
-fi
-
-dnl the name of the static library
-WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
-WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a"
-
dnl the name of the shared library
WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}.${WX_CURRENT}.${WX_REVISION}.${WX_AGE}"
WX_RESOURCES_MACOSX="lib${WX_LIBRARY}.rsrc"
WX_RESOURCES_MACOSX_COMPILED="lib${WX_LIBRARY}.r"
+case "${host}" in
+ *-*-cygwin* | *-*-mingw32* )
+
+ dnl If we are cross compiling we want to use the 'full' unix type name for the
+ dnl lib, but for a native install use the windows style naming convention.
+ dnl (excepting again that we strip the ELF style version numbers off it).
+
+ dnl FIXME: is this GL stuff actually even used for wxMSW? should it be??
+
+ if test "$cross_compiling" != "yes"; then
+ WX_LIBRARY="wxmsw${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
+ WX_LIBRARY_GL="wxmsw_gl${WX_MSW_VERSION}${lib_unicode_suffix}${lib_debug_suffix}"
+ WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}"
+ WX_LIBRARY_NAME_SHARED_GL="${WX_LIBRARY_GL}.${SO_SUFFIX}"
+ else
+ WX_LIBRARY_NAME_SHARED="lib${WX_LIBRARY}.${SO_SUFFIX}"
+ WX_LIBRARY_NAME_SHARED_GL="lib${WX_LIBRARY_GL}.${SO_SUFFIX}"
+ fi
+
+esac
+
+dnl the name of the static library
+WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
+WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a"
+
+dnl define which libs wx-config should link.
+WXCONFIG_LIBS="-l${WX_LIBRARY}"
+
+if test "$wxUSE_OPENGL" = "yes"; then
+ WXCONFIG_LIBS_GL="-l${WX_LIBRARY_GL} $OPENGL_LIBS"
+fi
+
+
dnl --- the marker for quick search, leave it here: SHARED_LIB_SETUP ---
if test "$wxUSE_SHARED" = "yes"; then
;;
*-*-cygwin* | *-*-mingw32* )
- dnl If we are cross compiling we want to use the 'full' unix type name for the
- dnl lib, but for a native install use the windows style naming convention.
-
- if test "$cross_compiling" != "yes"; then
- WX_LIBRARY="wxmsw${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}${WX_RELEASE_NUMBER}${lib_unicode_suffix}${lib_debug_suffix}"
- WX_LIBRARY_GL=${WX_LIBRARY} "wxmsw${WX_MAJOR_VERSION_NUMBER}${WX_MINOR_VERSION_NUMBER}${WX_RELEASE_NUMBER}${lib_unicode_suffix}${lib_debug_suffix}"
- WX_LIBRARY_NAME_SHARED="${WX_LIBRARY}.${SO_SUFFIX}"
- WX_LIBRARY_NAME_SHARED_GL="${WX_LIBRARY_GL}.${SO_SUFFIX}"
- WX_LIBRARY_NAME_STATIC="lib${WX_LIBRARY}.a"
- WX_LIBRARY_NAME_STATIC_GL="lib${WX_LIBRARY_GL}.a"
- fi
- WX_LIBRARY_IMPORTLIB="lib${WX_LIBRARY}.lib"
-
- dnl FIXME: this is a hack.. do we need a --static flag to wx-config?
- if test "$wxUSE_SHARED" = "yes" ; then
- WXCONFIG_LIBS="${WX_LIBRARY_IMPORTLIB}"
- else
- WXCONFIG_LIBS="-l${WX_LIBRARY}"
- fi
+ WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a"
SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o"
TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXUSINGDLL=1"
- WXMSW_DLL_DEFINES="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
+
+ PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
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_STATIC} \$(build_libdir)/${WX_LIBRARY_NAME_SHARED_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} \$(build_libdir)/${WX_LIBRARY_NAME_STATIC}"
+ WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
fi
- dnl -fPIC is not required for mingw build -- all code is already
- dnl position independent. Because of this we can (and do) build
- dnl a static lib from the same object files as the dll.
- PIC_FLAG=
;;
*-pc-os2_emx | *-pc-os2-emx )
AC_TYPE_UID_T
dnl check for wchar_t
+dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
AC_CACHE_CHECK([for wchar_t], wx_cv_type_wchar_t,
[
- AC_TRY_COMPILE([#include <wchar.h>],
+ AC_TRY_COMPILE(
+ [
+ #ifdef HAVE_WCHAR_H
+ # include <wchar.h>
+ #endif
+ #ifdef HAVE_STDLIB_H
+ # include <stdlib.h>
+ #endif
+ ],
[
wchar_t wc, *ws;
wc = L'a';
AC_CHECK_SIZEOF(long long, 0)
dnl we have to do it ourselves because SGI/Irix's stdio.h does not include
-dnl wchar_t an AC_CHECK_SIZEOF only includes stdio.h
+dnl wchar_t and AC_CHECK_SIZEOF only includes stdio.h
dnl Mac OS X does not provide wchar.h and wchar_t is defined by stdlib.h (GD)
AC_CACHE_CHECK([size of wchar_t], wx_cv_sizeof_wchar_t,
[
AC_SUBST(EXTRADEFS)
AC_SUBST(LIBS)
AC_SUBST(LD_LIBS)
-AC_SUBST(WXMSW_DLL_DEFINES)
dnl additional resurces settings
AC_SUBST(RESCOMP)