DEFAULT_wxUSE_PROTOCOL_FTP=no
DEFAULT_wxUSE_PROTOCOL_FILE=no
DEFAULT_wxUSE_URL=no
-
+
DEFAULT_wxUSE_COMMONDLGS=no
DEFAULT_wxUSE_CHOICEDLG=no
DEFAULT_wxUSE_COLOURDLG=no
WX_ARG_ENABLE(compat20, [ --enable-compat20 enable wxWindows 2.0 compatibility], WXWIN_COMPATIBILITY_2)
WX_ARG_ENABLE(compat22, [ --disable-compat22 disable wxWindows 2.2 compatibility], WXWIN_COMPATIBILITY_2_2)
+AC_ARG_ENABLE(rpath, [ --enable-rpath=DIR output the rpath flag from wx-config], [wxRPATH_DIR="$enableval"])
+
+if test "$wxRPATH_DIR" != "" -a "$wxRPATH_DIR" != "disable"; then
+ WXCONFIG_RPATH="-Wl,-rpath -Wl,$wxRPATH_DIR"
+fi
+
+
dnl ---------------------------------------------------------------------------
dnl (small) optional non GUI classes
dnl ---------------------------------------------------------------------------
dnl 'just' a POSIX platform, so the Win32 API must not be available
dnl ---------------------------------------------------------------------------
-define_win32=0
+dnl (Windows-only piece)
+wants_win32=0
+doesnt_want_win32=0
case "${host}" in
*-*-cygwin*)
if test "$wxUSE_MSW" = 1 ; then
- define_win32=1
+ wants_win32=1
+ else
+ doesnt_want_win32=1
fi
;;
*-*-mingw*)
- define_win32=1
+ wants_win32=1
;;
esac
-if test "$define_win32" = 1 ; then
+dnl NB: The two tests bellow are *NOT* mutually exclusive! They should only
+dnl take effect on Cygwin/Mingw and not other platforms.
+if test "$wants_win32" = 1 ; then
USE_UNIX=0
USE_WIN32=1
AC_DEFINE(__WIN32__)
AC_DEFINE(__GNUWIN32__)
AC_DEFINE(STRICT)
AC_DEFINE(WINVER, 0x0400)
-else
+fi
+if test "$doesnt_want_win32" = 1 ; then
USE_UNIX=1
USE_WIN32=0
fi
+dnl (end of Windows-only piece)
if test "$USE_UNIX" = 1 ; then
wxUSE_UNIX=yes
case ${INSTALL} in
/* ) # Absolute
;;
- *)
+ *)
INSTALL=`pwd`/${INSTALL} ;;
esac
PNG_LINK=
if test "$wxUSE_LIBPNG" != "no" ; then
AC_DEFINE(wxUSE_LIBPNG)
-
+
if test "$wxUSE_MGL" = 1 -a "$wxUSE_LIBPNG" = "builtin" ; then
AC_MSG_WARN([wxMGL doesn't work with builtin png library, will use MGL one instead])
wxUSE_LIBPNG=sys
)
fi
- dnl MBN: this should really be an AC_TRY_LINK, but it is faster
- dnl to special case it
- xt_needs_sm_ice=
- case "${host}" in
- *-*-cygwin* )
- xt_needs_sm_ice=" -lSM -lICE"
- ;;
- esac
+ AC_MSG_CHECKING([if we need -lXp and/or -lSM -lICE])
+ libp_link=""
+ libsm_ice_link=""
+ libs_found=0
+ for libp in "" " -lXp"; do
+ if test "$libs_found" = "0"; then
+ for libsm_ice in " -lSM -lICE"; do
+ if test "$libs_found" = "0"; then
+ save_LIBS="$LIBS"
+ LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
+ AC_TRY_LINK(
+ [
+ #include <Xm/Xm.h>
+ #include <Xm/List.h>
+ ],
+ [
+ XmString string = NULL;
+ Widget w = NULL;
+ int position = 0;
+ XmListAddItem(w, string, position);
+ ],
+ [
+ libp_link="$libp"
+ libsm_ice_link="$libsm_ice"
+ AC_MSG_RESULT(
+ [need${libp_link}${libsm_ice_link}])
+ libs_found=1
+ ], []
+ )
+ LIBS="$save_LIBS"
+ fi
+ done
+ fi
+ done
+
+ if test "$libs_found" = "0"; then
+ AC_MSG_RESULT([can't find the right libraries])
+ AC_MSG_ERROR([can't link a simple motif program])
+ fi
- GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm$xpm_link -lXmu -lXext -lXt${xt_needs_sm_ice} -lX11"
+ GUI_TK_LIBRARY="$GUI_TK_LIBRARY -lXm$xpm_link${libp_link} -lXmu -lXext -lXt${libsm_ice_link} -lX11"
TOOLKIT_VPATH="\${top_srcdir}/src/motif${PATH_IFS}\${top_srcdir}/src/motif/xmcombo"
TOOLKIT=MOTIF
GUIDIST=MOTIF_DIST
dnl dynamic shared libraries (in order to embed the resources)
if test "$wxUSE_MAC" = 1; then
dnl the name of the resources file for wxMac
- WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
+ WX_RESOURCES_MACOSX_ASCII="lib${WX_LIBRARY}.r"
WX_RESOURCES_MACOSX_DATA="lib${WX_LIBRARY}.rsrc"
fi
;;
if test "$wxUSE_UNICODE" = "yes" ; then
AC_DEFINE(wxUSE_UNICODE)
-
+
if test "$wxUSE_MSW" != 1; then
wxUSE_UNICODE_MSLU=no
fi
else
if test "$wxUSE_PM" = 1; then
AC_MSG_WARN([wxPopupWindow not yet supported under PM... disabled])
- else
+ else
AC_DEFINE(wxUSE_POPUPWIN)
USES_CONTROLS=1
if test "$wxUSE_TIPWINDOW" = "yes"; then
if test "$wxUSE_PM" = 1; then
AC_MSG_WARN([wxTipWindow not yet supported under PM... disabled])
- else
+ else
AC_DEFINE(wxUSE_TIPWINDOW)
fi
fi
AC_SUBST(WXCONFIG_LIBS_STATIC)
AC_SUBST(WXCONFIG_LIBS_STATIC_GL)
AC_SUBST(WXCONFIG_INCLUDE)
+AC_SUBST(WXCONFIG_RPATH)
dnl the list of files to compile/install
AC_SUBST(ALL_OBJECTS)