dnl assume Unix
USE_UNIX=1
+USE_WIN32=0
USE_LINUX=
USE_SGI=
USE_HPUX=
*-*-cygwin32* )
USE_UNIX=0
+ USE_WIN32=1
AC_DEFINE(__WIN32__)
AC_DEFINE(__WIN95__)
AC_DEFINE(__WINDOWS__)
;;
*-*-mingw32* )
USE_UNIX=0
+ USE_WIN32=1
AC_DEFINE(__WIN32__)
AC_DEFINE(__WIN95__)
AC_DEFINE(__WINDOWS__)
INCLUDE_SUBDIRS="$INCLUDE_SUBDIRS msw"
dnl --- Quick & Dirty ; link against most/all libraries
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"
+ LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lctl3d32 -lcrtdll -ladvapi32 -lwsock32"
+
+ dnl -mwindows is needed to avoid that spawning of a console window
+ if test "$wxUSE_MINGW" = 1; then
+ LDFLAGS="$LDFLAGS -mwindows"
+ fi
TOOLKIT=MSW
fi
if test "$wxUSE_MOTIF" = 1; then
- dnl find the X11 include and library files
- dnl defines x_includes and x_libraries
- AC_PATH_XTRA
-
- if test "$no_x" = "yes"; then
- AC_MSG_ERROR(X11 libraries not found, aborting)
+ AC_MSG_CHECKING(for X11 headers)
+ WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, X11/Intrinsic.h)
+ if test "$ac_find_includes" != "" ; then
+ AC_MSG_RESULT(found $ac_find_includes)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set CFLAGS to contain the location of Xm/Xm.h)
fi
- TOOLKIT_INCLUDE="$X_CFLAGS"
- GUI_TK_LIBRARY="$X_LIBS"
+ AC_MSG_CHECKING(for X11 libraries)
+ WX_PATH_FIND_LIBRARIES($SEARCH_LIB, X11)
+ if test "$ac_find_libraries" != "" ; then
+ WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
+ WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
+
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
+ TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include"
+ AC_MSG_RESULT(found at $ac_find_libraries)
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
+ fi
- AC_MSG_CHECKING(for Motif/Lesstif includes)
+ AC_MSG_CHECKING(for Motif/Lesstif headers)
WX_PATH_FIND_INCLUDES($SEARCH_INCLUDE, Xm/Xm.h)
if test "$ac_find_includes" != "" ; then
AC_MSG_RESULT(found $ac_find_includes)
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
- CHECK_LINK="$GUI_TK_LIBRARY $ac_path_to_link"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE $ac_path_to_include"
AC_MSG_RESULT(found at $ac_find_libraries)
else
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xt)
if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
- CHECK_LINK="$GUI_TK_LIBRARY $ac_path_to_link"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
AC_MSG_RESULT(found at $ac_find_libraries)
else
AC_MSG_RESULT(no)
WX_PATH_FIND_LIBRARIES($SEARCH_LIB,Xpm)
if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
- CHECK_LINK="$GUI_TK_LIBRARY $ac_path_to_link"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY $ac_path_to_link"
XPM_LINK="-lXpm "
AC_DEFINE(wxHAVE_LIB_XPM)
AC_MSG_RESULT(found at $ac_find_libraries)
WX_ALL_INSTALLED=
if test "$wxUSE_SHARED" = "yes"; then
- dnl set target to shared
- WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
-
case "${host}" in
*-hp-hpux* )
+ if test "$GCC" = yes ; then
+ SHARED_LD="${CC} -shared -o"
+ PIC_FLAG="-fPIC"
+ else
+ SHARED_LD="${CXX} -b -o"
+ PIC_FLAG="+Z"
+ fi
WX_LIBRARY_NAME_SHARED="libwx_${TOOLKIT_DIR}.sl"
- SHARED_LD="${CXX} -b -o"
- PIC_FLAG="+Z"
WX_ALL=${WX_LIBRARY_NAME_SHARED}
;;
*-*-linux* )
AC_MSG_ERROR(unknown system type ${host}.)
esac
+ dnl set target to shared if not explicitly chose static before
+ if test "x$WX_TARGET_LIBRARY" = "x"; then
+ WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_SHARED}"
+ fi
else
dnl set target to static
WX_TARGET_LIBRARY="${WX_LIBRARY_NAME_STATIC}"
CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS thread"
+else
+ dnl on some systems, _REENTRANT should bedefined if we want to use any _r()
+ dnl functions - add tests for other functions here as well
+ if test "$ac_cv_func_strtok_r" = "yes"; then
+ CFLAGS="${CFLAGS} -D_REENTRANT"
+ CXXFLAGS="${CXXFLAGS} -D_REENTRANT"
+ fi
fi
if test "$WXGTK12" = 1 ; then
AC_MSG_CHECKING(the type of the third argument of getsockname)
AC_TRY_COMPILE(
[#include <sys/socket.h>],
- [socklen_t len; getsockname(0, NULL, &len);],
+ [socklen_t len; getsockname(0, 0, &len);],
AC_DEFINE(SOCKLEN_T, socklen_t) AC_MSG_RESULT(socklen_t),
AC_TRY_COMPILE(
[#include <sys/socket.h>],
- [size_t len; getsockname(0, NULL, &len);],
+ [size_t len; getsockname(0, 0, &len);],
AC_DEFINE(SOCKLEN_T, size_t) AC_MSG_RESULT(size_t),
AC_TRY_COMPILE(
[#include <sys/socket.h>],
- [int len; getsockname(0, NULL, &len);],
+ [int len; getsockname(0, 0, &len);],
AC_DEFINE(SOCKLEN_T, int) AC_MSG_RESULT(int),
AC_MSG_RESULT(unknown)
)
wxUSE_DRAG_AND_DROP=no
fi
+ if test "$USE_WIN32" = 1; then
+ dnl check for ole headers and disable DnD if not present (earlier
+ dnl versions of mingw32 don't have them)
+ AC_CHECK_HEADERS(ole2.h)
+ if test "x$HAVE_OLE2_H" = x ; then
+ AC_MSG_WARN(Drag and drop disabled because OLE headers not found)
+ wxUSE_DRAG_AND_DROP=no
+ fi
+ fi
+
if test "$wxUSE_DRAG_AND_DROP" = "yes"; then
AC_DEFINE(wxUSE_DRAG_AND_DROP)
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS dnd"
fi
+
fi
if test "$wxUSE_SPLINES" = "yes" ; then
samples/resource/Makefile
samples/sashtest/Makefile
samples/scroll/Makefile
+ samples/scrollsub/Makefile
samples/splitter/Makefile
samples/text/Makefile
samples/thread/Makefile