1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-02-05 20:43:08 +00:00

* configure.in: Use HAVE_GPM instead of HAVE_GPM_H and implement

it like others.
* configure: Regenerate.
This commit is contained in:
Nick Roberts 2007-05-20 05:16:40 +00:00
parent 7e5a23bd93
commit 79011b824e
2 changed files with 236 additions and 80 deletions

297
configure vendored
View File

@ -412,10 +412,10 @@ else
fi
test \$exitcode = 0") || {
echo Please tell bug-autoconf@gnu.org about your system,
echo including any error possibly output before this message.
echo This can help us improve future autoconf versions.
echo Configuration will now proceed without shell functions.
echo No shell found that supports shell functions.
echo Please tell autoconf@gnu.org about your system,
echo including any error possibly output before this
echo message
}
@ -721,7 +721,6 @@ X_TOOLKIT_TYPE
machfile
opsysfile
carbon_appdir
LIBGPM
LTLIBOBJS'
ac_subst_files=''
ac_precious_vars='build_alias
@ -1341,6 +1340,7 @@ Optional Packages:
--with-tiff use -ltiff for displaying TIFF images
--with-gif use -lungif for displaying GIF images
--with-png use -lpng for displaying PNG images
--with-gpm use -lgpm for mouse support on a GNU/Linux console
--with-gtk use GTK (same as --with-x-toolkit=gtk)
--with-pkg-config-prog Path to pkg-config to use for finding GTK
--without-toolkit-scroll-bars
@ -1943,6 +1943,12 @@ if test "${with_png+set}" = set; then
fi
# Check whether --with-gpm was given.
if test "${with_gpm+set}" = set; then
withval=$with_gpm;
fi
# Check whether --with-gtk was given.
if test "${with_gtk+set}" = set; then
withval=$with_gtk;
@ -6521,14 +6527,13 @@ fi
for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
sys/utsname.h pwd.h gpm.h
sys/utsname.h pwd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
@ -13939,6 +13944,213 @@ _ACEOF
fi
fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
if test "${with_gpm}" != "no"; then
if test "${ac_cv_header_gpm_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for gpm.h" >&5
echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
if test "${ac_cv_header_gpm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
else
# Is the header compilable?
{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <gpm.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <gpm.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
;;
esac
{ echo "$as_me:$LINENO: checking for gpm.h" >&5
echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
if test "${ac_cv_header_gpm_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_header_gpm_h=$ac_header_preproc
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
fi
if test $ac_cv_header_gpm_h = yes; then
{ echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Gpm_Open ();
int
main ()
{
return Gpm_Open ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_gpm_Gpm_Open=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
HAVE_GPM=yes
fi
fi
fi
if test "${HAVE_GPM}" = "yes"; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_GPM 1
_ACEOF
fi
if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
@ -23071,73 +23283,6 @@ _ACEOF
fi
{ echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char Gpm_Open ();
int
main ()
{
return Gpm_Open ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_gpm_Gpm_Open=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
LIBGPM=-lgpm
fi
@ -23180,6 +23325,7 @@ echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use -lungif? ${HAVE_GIF}"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo
@ -24014,11 +24160,10 @@ X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
machfile!$machfile$ac_delim
opsysfile!$opsysfile$ac_delim
carbon_appdir!$carbon_appdir$ac_delim
LIBGPM!$LIBGPM$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -113,6 +113,8 @@ AC_ARG_WITH(gif,
[ --with-gif use -lungif for displaying GIF images])
AC_ARG_WITH(png,
[ --with-png use -lpng for displaying PNG images])
AC_ARG_WITH(gpm,
[ --with-gpm use -lgpm for mouse support on a GNU/Linux console])
AC_ARG_WITH(gtk,
[ --with-gtk use GTK (same as --with-x-toolkit=gtk)])
AC_ARG_WITH(pkg-config-prog,
@ -1630,7 +1632,7 @@ AC_CHECK_HEADERS(sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
sys/utsname.h pwd.h gpm.h)
sys/utsname.h pwd.h)
AC_MSG_CHECKING(if personality LINUX32 can be set)
AC_TRY_COMPILE([#include <sys/personality.h>], [personality (PER_LINUX32)],
@ -2507,6 +2509,17 @@ if test "${HAVE_X11}" = "yes"; then
fi
fi
### Use -lgpm if available, unless `--with-gpm=no'.
HAVE_GPM=no
if test "${with_gpm}" != "no"; then
AC_CHECK_HEADER(gpm.h,
AC_CHECK_LIB(gpm, Gpm_Open, HAVE_GPM=yes))
fi
if test "${HAVE_GPM}" = "yes"; then
AC_DEFINE(HAVE_GPM, 1, [Define to 1 if you have the gpm library (-lgpm).])
fi
dnl Check for malloc/malloc.h on darwin
AC_CHECK_HEADER(malloc/malloc.h, AC_DEFINE(HAVE_MALLOC_MALLOC_H, 1, [Define to 1 if you have the <malloc/malloc.h> header file.]))
@ -2938,9 +2951,6 @@ if test "${REL_ALLOC}" = "yes" ; then
buffer space.])
fi
AC_CHECK_LIB(gpm, Gpm_Open, LIBGPM=-lgpm)
AC_SUBST(LIBGPM)
AH_TOP([/* GNU Emacs site configuration template file.
Copyright (C) 1988, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
@ -3270,6 +3280,7 @@ echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
echo " Does Emacs use -lungif? ${HAVE_GIF}"
echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lgpm? ${HAVE_GPM}"
echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
echo