fix wxMotif sample program compile test

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16712 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-08-23 17:43:51 +00:00
parent 1d65a68f65
commit dd0e4a9047
2 changed files with 305 additions and 273 deletions

544
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -2183,7 +2183,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
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)
AC_MSG_RESULT(found in $ac_find_includes)
WX_INCLUDE_PATH_EXIST($ac_find_includes, $TOOLKIT_INCLUDE)
TOOLKIT_INCLUDE="$TOOLKIT_INCLUDE$ac_path_to_include"
else
AC_TRY_COMPILE(
[
@ -2208,16 +2210,17 @@ equivalent variable and GTK+ is version 1.2.3 or above.
AC_MSG_CHECKING(for Motif/Lesstif library)
WX_PATH_FIND_LIBRARIES($SEARCH_LIB, Xm)
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)
WX_LINK_PATH_EXIST($ac_find_libraries, $GUI_TK_LIBRARY)
GUI_TK_LIBRARY="$GUI_TK_LIBRARY$ac_path_to_link"
else
dnl it might happen that we found headers in one of the standard
dnl paths but the libs are elsewhere - we do need to try to
dnl compile a sample program then here
dnl it might happen that we found headers in one of the
dnl standard paths but the libs are elsewhere - we do need to
dnl try to compile a sample program then here
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
AC_TRY_COMPILE(
[
#include <Xm/Xm.h>
@ -2235,6 +2238,8 @@ equivalent variable and GTK+ is version 1.2.3 or above.
AC_MSG_ERROR(please set LDFLAGS to contain the location of libXm)
]
)
CFLAGS=$save_CFLAGS
fi
fi
@ -2244,10 +2249,14 @@ equivalent variable and GTK+ is version 1.2.3 or above.
if test "$ac_find_libraries" != "" ; then
WX_LINK_PATH_EXIST($ac_find_libraries,$GUI_TK_LIBRARY)
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)
else
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
AC_TRY_COMPILE(
[
#include <X11/xpm.h>
@ -2267,6 +2276,8 @@ equivalent variable and GTK+ is version 1.2.3 or above.
AC_MSG_WARN(library will be compiled without support for images in XPM format)
]
)
CFLAGS=$save_CFLAGS
fi
AC_MSG_CHECKING([if we need -lXp and/or -lSM -lICE])
@ -2279,6 +2290,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
if test "$libs_found" = "0"; then
save_LIBS="$LIBS"
LIBS="$GUI_TK_LIBRARY -lXm${xpm_link} ${libp} -lXmu -lXext -lXt${libsm_ice} -lX11"
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $TOOLKIT_INCLUDE"
AC_TRY_LINK(
[
#include <Xm/Xm.h>
@ -2298,7 +2312,9 @@ equivalent variable and GTK+ is version 1.2.3 or above.
libs_found=1
], []
)
LIBS="$save_LIBS"
CFLAGS=$save_CFLAGS
fi
done
fi