Mercurial > hg > xemacs-beta
comparison configure.ac @ 3727:3246cf3e564d
[xemacs-hg @ 2006-12-08 02:17:15 by vins]
Added Rick Rankin's patch to support new xpm location on cygwin.
author | vins |
---|---|
date | Fri, 08 Dec 2006 02:17:16 +0000 |
parents | 72e6cbbc65e0 |
children | 96cba27916dd |
comparison
equal
deleted
inserted
replaced
3726:00ae2d5b2667 | 3727:3246cf3e564d |
---|---|
3958 | 3958 |
3959 dnl add special code to handle xpm-nox on Cygwin (csw) | 3959 dnl add special code to handle xpm-nox on Cygwin (csw) |
3960 dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X | 3960 dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X |
3961 libpath_xpm= | 3961 libpath_xpm= |
3962 incpath_xpm= | 3962 incpath_xpm= |
3963 libname_xpm="-lXpm" | |
3963 case "$opsys" in | 3964 case "$opsys" in |
3964 cygwin*) | 3965 cygwin*) |
3965 cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` | 3966 cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'` |
3966 cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"` | 3967 cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"` |
3967 case "$window_system" in | 3968 case "$window_system" in |
3968 dnl use "standard" search pattern | 3969 dnl use "standard" search pattern |
3969 x11) ;; | 3970 x11) ;; |
3970 dnl hardcode "standard" non-X11 xpm lib/inc dirs | 3971 dnl hardcode "standard" non-X11 xpm lib/inc dirs |
3971 msw) libpath_xpm="-L${cygwin_top}/lib/noX" | 3972 msw) libpath_xpm="-L${cygwin_top}/lib/noX" |
3972 incpath_xpm="-I${cygwin_top}/include/noX" | 3973 incpath_xpm="-I${cygwin_top}/include/noX" |
3974 libname_xpm="-lXpm-noX" | |
3973 ;; | 3975 ;; |
3974 dnl not supported on cygwin (yet?) | 3976 dnl not supported on cygwin (yet?) |
3975 gtk) ;; | 3977 gtk) ;; |
3976 dnl probably not reached... | 3978 dnl probably not reached... |
3977 none) ;; | 3979 none) ;; |
3987 if test -z "$with_xpm"; then | 3989 if test -z "$with_xpm"; then |
3988 XE_PREPEND("$incpath_xpm", CFLAGS) | 3990 XE_PREPEND("$incpath_xpm", CFLAGS) |
3989 XE_PREPEND("$incpath_xpm", XE_CFLAGS) | 3991 XE_PREPEND("$incpath_xpm", XE_CFLAGS) |
3990 XE_PREPEND("$libpath_xpm", LDFLAGS) | 3992 XE_PREPEND("$libpath_xpm", LDFLAGS) |
3991 AC_MSG_CHECKING(for Xpm - no older than 3.4f) | 3993 AC_MSG_CHECKING(for Xpm - no older than 3.4f) |
3992 xe_check_libs=-lXpm | 3994 xe_check_libs="$libname_xpm" |
3993 AC_RUN_IFELSE([AC_LANG_SOURCE([#define XPM_NUMBERS | 3995 AC_RUN_IFELSE([AC_LANG_SOURCE([#define XPM_NUMBERS |
3994 #include <X11/xpm.h> | 3996 #include <X11/xpm.h> |
3995 int main(int c, char **v) { | 3997 int main(int c, char **v) { |
3996 return c == 1 ? 0 : | 3998 return c == 1 ? 0 : |
3997 XpmIncludeVersion != XpmLibraryVersion() ? 1 : | 3999 XpmIncludeVersion != XpmLibraryVersion() ? 1 : |
4022 dnl #### This code assumes that if AC_CHECK_LIB fails, | 4024 dnl #### This code assumes that if AC_CHECK_LIB fails, |
4023 dnl #### then it will succeed if FOR_MSW is defined, | 4025 dnl #### then it will succeed if FOR_MSW is defined, |
4024 dnl #### but doesn't actually verify this assumption. | 4026 dnl #### but doesn't actually verify this assumption. |
4025 AC_DEFINE(HAVE_XPM) | 4027 AC_DEFINE(HAVE_XPM) |
4026 XE_PREPEND("$libpath_xpm", LDFLAGS) | 4028 XE_PREPEND("$libpath_xpm", LDFLAGS) |
4027 XE_PREPEND(-lXpm, libs_x) | 4029 XE_PREPEND("$libname_xpm", libs_x) |
4028 XE_PREPEND("$incpath_xpm", CFLAGS) | 4030 XE_PREPEND("$incpath_xpm", CFLAGS) |
4029 XE_PREPEND("$incpath_xpm", XE_CFLAGS) | 4031 XE_PREPEND("$incpath_xpm", XE_CFLAGS) |
4030 AC_MSG_CHECKING([for "FOR_MSW" xpm]) | 4032 AC_MSG_CHECKING([for "FOR_MSW" xpm]) |
4031 xe_check_libs=-lXpm | 4033 xe_check_libs="$libname_xpm" |
4032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[XpmCreatePixmapFromData();])], | 4034 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[XpmCreatePixmapFromData();])], |
4033 [xpm_for_msw=no], | 4035 [xpm_for_msw=no], |
4034 [xpm_for_msw=yes]) | 4036 [xpm_for_msw=yes]) |
4035 xe_check_libs= | 4037 xe_check_libs= |
4036 AC_MSG_RESULT($xpm_for_msw) | 4038 AC_MSG_RESULT($xpm_for_msw) |