dnl XEmacs supported mingw and cygnus have made this incompatible change
dnl so we just go with the flow.
case "$opsys" in mingw* | cygwin*)
- cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_include=`eval "dirname $cygwin_include"` ;
- cygwin_include="-I$cygwin_include/../include" ;
+ cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
+ cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"`
+ cygwin_include="-I$cygwin_include/include" ;
extra_includes="$cygwin_include/mingw $cygwin_include" ;
case "$opsys" in mingw*)
XE_APPEND($extra_includes, c_switch_system) ;;
if test "$x_libraries" = "NONE"; then
for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
- if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
+ if test -r "$dir/libX11.a" -o -r "$dir/libX11.dylib"; then x_libraries="$dir"; break; fi
done
fi
dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X
libpath_xpm=
incpath_xpm=
+ libname_xpm="-lXpm"
case "$opsys" in
cygwin*)
- cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_top=`eval "dirname ${cygwin_top}"`;
- cygwin_top="${cygwin_top}/..";
+ cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
+ cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
case "$window_system" in
dnl use "standard" search pattern
x11) ;;
dnl hardcode "standard" non-X11 xpm lib/inc dirs
msw) libpath_xpm="-L${cygwin_top}/lib/noX"
incpath_xpm="-I${cygwin_top}/include/noX"
+ libname_xpm="-lXpm-noX"
;;
dnl not supported on cygwin (yet?)
gtk) ;;
XE_PREPEND("$incpath_xpm", CFLAGS)
XE_PREPEND("$libpath_xpm", LDFLAGS)
AC_MSG_CHECKING(for Xpm - no older than 3.4f)
- xe_check_libs=-lXpm
+ xe_check_libs="$libname_xpm"
AC_TRY_RUN([#define XPM_NUMBERS
#include <X11/xpm.h>
int main(int c, char **v) {
dnl #### but doesn't actually verify this assumption.
AC_DEFINE(HAVE_XPM)
XE_PREPEND("$libpath_xpm", LDFLAGS)
- XE_PREPEND(-lXpm, libs_x)
+ XE_PREPEND("$libname_xpm", libs_x)
XE_PREPEND("$incpath_xpm", CFLAGS)
AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
- xe_check_libs=-lXpm
+ xe_check_libs="$libname_xpm"
AC_TRY_LINK(, [XpmCreatePixmapFromData()],
[xpm_for_msw=no],
[xpm_for_msw=yes])