3 |
dnl autoconf |
dnl autoconf |
4 |
dnl in the directory containing this script. |
dnl in the directory containing this script. |
5 |
dnl |
dnl |
6 |
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004 |
dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
7 |
dnl Free Software Foundation, Inc. |
dnl Free Software Foundation, Inc. |
8 |
dnl |
dnl |
9 |
dnl This file is part of GNU Emacs. |
dnl This file is part of GNU Emacs. |
2080 |
fi |
fi |
2081 |
|
|
2082 |
if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
|
AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, |
|
|
# We put this in CFLAGS temporarily to precede other -I options |
|
|
# that might be in CFLAGS temporarily. |
|
|
# We put this in CPPFLAGS where it precedes the other -I options. |
|
|
OLD_CPPFLAGS=$CPPFLAGS |
|
|
OLD_CFLAGS=$CFLAGS |
|
|
CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" |
|
|
CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" |
|
|
[AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], |
|
|
[int x = 5;], |
|
|
emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) |
|
|
if test $emacs_cv_lesstif = yes; then |
|
|
# Make sure this -I option remains in CPPFLAGS after it is set |
|
|
# back to REAL_CPPFLAGS. |
|
|
# There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not |
|
|
# have those other -I options anyway. Ultimately, having this |
|
|
# directory ultimately in CPPFLAGS will be enough. |
|
|
REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" |
|
|
LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" |
|
|
else |
|
|
CFLAGS=$OLD_CFLAGS |
|
|
CPPFLAGS=$OLD_CPPFLAGS |
|
|
fi |
|
2083 |
AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
2084 |
[AC_TRY_COMPILE([#include <Xm/Xm.h>], |
[AC_TRY_COMPILE([#include <Xm/Xm.h>], |
2085 |
[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
[#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1) |
2098 |
AC_DEFINE(HAVE_LIBXP, 1, |
AC_DEFINE(HAVE_LIBXP, 1, |
2099 |
[Define to 1 if you have the Xp library (-lXp).]) |
[Define to 1 if you have the Xp library (-lXp).]) |
2100 |
fi |
fi |
2101 |
|
else |
2102 |
|
AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, |
2103 |
|
# We put this in CFLAGS temporarily to precede other -I options |
2104 |
|
# that might be in CFLAGS temporarily. |
2105 |
|
# We put this in CPPFLAGS where it precedes the other -I options. |
2106 |
|
OLD_CPPFLAGS=$CPPFLAGS |
2107 |
|
OLD_CFLAGS=$CFLAGS |
2108 |
|
CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS" |
2109 |
|
CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS" |
2110 |
|
[AC_TRY_COMPILE([#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>], |
2111 |
|
[int x = 5;], |
2112 |
|
emacs_cv_lesstif=yes, emacs_cv_lesstif=no)]) |
2113 |
|
if test $emacs_cv_lesstif = yes; then |
2114 |
|
# Make sure this -I option remains in CPPFLAGS after it is set |
2115 |
|
# back to REAL_CPPFLAGS. |
2116 |
|
# There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not |
2117 |
|
# have those other -I options anyway. Ultimately, having this |
2118 |
|
# directory ultimately in CPPFLAGS will be enough. |
2119 |
|
REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS" |
2120 |
|
LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS" |
2121 |
|
else |
2122 |
|
CFLAGS=$OLD_CFLAGS |
2123 |
|
CPPFLAGS=$OLD_CPPFLAGS |
2124 |
|
fi |
2125 |
fi |
fi |
2126 |
fi |
fi |
2127 |
|
|