Mercurial > emacs
comparison configure.in @ 35204:5ff35be3bb08
Don't reset LIBS at end of -lXmu test. Test for
-lXext.
(HAVE_XKBGETKEYBOARD): Fix reporting of result.
(HAVE_LIBXP): Remove -lXt from AC_CHECK_LIB.
(HAVE_XAW3D, HAVE_XPM, HAVE_JPEG, HAVE_PNG, HAVE_TIFF, HAVE_GIF):
Don't frob CFLAGS. Remove extra X libs from AC_CHECK_LIB
(now in $LIBS).
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 10 Jan 2001 15:18:48 +0000 |
parents | d5251a5c10ef |
children | f67ec8c72036 |
comparison
equal
deleted
inserted
replaced
35203:dcf1f0621dbb | 35204:5ff35be3bb08 |
---|---|
1 dnl Autoconf script for GNU Emacs | 1 dnl Autoconf script for GNU Emacs |
2 dnl To rebuild the `configure' script from this, execute the command | 2 dnl To rebuild the `configure' script from this, execute the command |
3 dnl autoconf | 3 dnl autoconf |
4 dnl in the directory containing this script. | 4 dnl in the directory containing this script. |
5 dnl | 5 dnl |
6 dnl Copyright (C) 1994, 1995, 1996, 1999, 2000 Free Software Foundation, Inc. | 6 dnl Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001 |
7 dnl Free Software Foundation, Inc. | |
7 dnl | 8 dnl |
8 dnl This file is part of GNU Emacs. | 9 dnl This file is part of GNU Emacs. |
9 dnl | 10 dnl |
10 dnl GNU Emacs is free software; you can redistribute it and/or modify | 11 dnl GNU Emacs is free software; you can redistribute it and/or modify |
11 dnl it under the terms of the GNU General Public License as published by | 12 dnl it under the terms of the GNU General Public License as published by |
1637 AC_MSG_CHECKING(for Xkb) | 1638 AC_MSG_CHECKING(for Xkb) |
1638 AC_TRY_LINK([#include <X11/Xlib.h> | 1639 AC_TRY_LINK([#include <X11/Xlib.h> |
1639 #include <X11/XKBlib.h>], | 1640 #include <X11/XKBlib.h>], |
1640 [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);], | 1641 [XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);], |
1641 emacs_xkb=yes, emacs_xkb=no) | 1642 emacs_xkb=yes, emacs_xkb=no) |
1642 AC_MSG_CHECKING($emacs_xkb) | 1643 AC_MSG_RESULT($emacs_xkb) |
1643 if test $emacs_xkb = yes; then | 1644 if test $emacs_xkb = yes; then |
1644 AC_DEFINE(HAVE_XKBGETKEYBOARD) | 1645 AC_DEFINE(HAVE_XKBGETKEYBOARD) |
1645 fi | 1646 fi |
1646 | 1647 |
1647 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ | 1648 AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ |
1731 LIBS="-lXt -lSM -lICE $LIBS" | 1732 LIBS="-lXt -lSM -lICE $LIBS" |
1732 else | 1733 else |
1733 LIBS="-lXt $LIBS" | 1734 LIBS="-lXt $LIBS" |
1734 fi | 1735 fi |
1735 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) | 1736 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) |
1736 LIBS="$OLDLIBS" | 1737 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" |
1738 fi | |
1739 | |
1740 # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. | |
1741 if test "${HAVE_X11}" = "yes"; then | |
1742 if test "${USE_X_TOOLKIT}" != "none"; then | |
1743 AC_CHECK_LIB(Xext, XShapeQueryExtension) | |
1744 fi | |
1737 fi | 1745 fi |
1738 | 1746 |
1739 if test "${USE_X_TOOLKIT}" = "MOTIF"; then | 1747 if test "${USE_X_TOOLKIT}" = "MOTIF"; then |
1740 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, | 1748 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, |
1741 AC_TRY_COMPILE([#include <Xm/Xm.h>], | 1749 AC_TRY_COMPILE([#include <Xm/Xm.h>], |
1747 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)) | 1755 emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)) |
1748 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 | 1756 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1 |
1749 if test $emacs_cv_motif_version_2_1 = yes; then | 1757 if test $emacs_cv_motif_version_2_1 = yes; then |
1750 HAVE_LIBXP=no | 1758 HAVE_LIBXP=no |
1751 AC_DEFINE(HAVE_MOTIF_2_1) | 1759 AC_DEFINE(HAVE_MOTIF_2_1) |
1752 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes, , -lXext) | 1760 AC_CHECK_LIB(Xp, XpCreateContext, HAVE_LIBXP=yes) |
1753 if test ${HAVE_LIBXP} = yes; then | 1761 if test ${HAVE_LIBXP} = yes; then |
1754 AC_DEFINE(HAVE_LIBXP) | 1762 AC_DEFINE(HAVE_LIBXP) |
1755 fi | 1763 fi |
1756 fi | 1764 fi |
1757 fi | 1765 fi |
1758 | 1766 |
1759 ### Is -lXaw3d available? | 1767 ### Is -lXaw3d available? |
1760 HAVE_XAW3D=no | 1768 HAVE_XAW3D=no |
1761 if test "${HAVE_X11}" = "yes"; then | 1769 if test "${HAVE_X11}" = "yes"; then |
1762 if test "${USE_X_TOOLKIT}" != "none"; then | 1770 if test "${USE_X_TOOLKIT}" != "none"; then |
1763 old_c_flags="${CFLAGS}" | |
1764 CFLAGS="${LD_SWITCH_X_SITE}" | |
1765 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, | 1771 AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, |
1766 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes, , -lX11)) | 1772 AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)) |
1767 CFLAGS="${old_c_flags}" | |
1768 | |
1769 if test "${HAVE_XAW3D}" = "yes"; then | 1773 if test "${HAVE_XAW3D}" = "yes"; then |
1770 AC_DEFINE(HAVE_XAW3D) | 1774 AC_DEFINE(HAVE_XAW3D) |
1771 fi | 1775 fi |
1772 fi | 1776 fi |
1773 fi | 1777 fi |
1799 | 1803 |
1800 ### Use -lXpm if available, unless `--with-xpm=no'. | 1804 ### Use -lXpm if available, unless `--with-xpm=no'. |
1801 HAVE_XPM=no | 1805 HAVE_XPM=no |
1802 if test "${HAVE_X11}" = "yes"; then | 1806 if test "${HAVE_X11}" = "yes"; then |
1803 if test "${with_xpm}" != "no"; then | 1807 if test "${with_xpm}" != "no"; then |
1804 old_c_flags="${CFLAGS}" | |
1805 CFLAGS="${LD_SWITCH_X_SITE}" | |
1806 AC_CHECK_HEADER(X11/xpm.h, | 1808 AC_CHECK_HEADER(X11/xpm.h, |
1807 AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)) | 1809 AC_CHECK_LIB(Xpm, XpmReadFileToPixmap, HAVE_XPM=yes, , -lX11)) |
1808 if test "${HAVE_XPM}" = "yes"; then | 1810 if test "${HAVE_XPM}" = "yes"; then |
1809 AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) | 1811 AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) |
1810 AC_EGREP_CPP(no_return_alloc_pixels, | 1812 AC_EGREP_CPP(no_return_alloc_pixels, |
1812 #ifndef XpmReturnAllocPixels | 1814 #ifndef XpmReturnAllocPixels |
1813 no_return_alloc_pixels | 1815 no_return_alloc_pixels |
1814 #endif | 1816 #endif |
1815 ], HAVE_XPM=no, HAVE_XPM=yes) | 1817 ], HAVE_XPM=no, HAVE_XPM=yes) |
1816 fi | 1818 fi |
1817 CFLAGS="${old_c_flags}" | |
1818 if test "${HAVE_XPM}" = "yes"; then | 1819 if test "${HAVE_XPM}" = "yes"; then |
1819 AC_MSG_RESULT(yes) | 1820 AC_MSG_RESULT(yes) |
1820 else | 1821 else |
1821 AC_MSG_RESULT(no) | 1822 AC_MSG_RESULT(no) |
1822 fi | 1823 fi |
1829 | 1830 |
1830 ### Use -ljpeg if available, unless `--with-jpeg=no'. | 1831 ### Use -ljpeg if available, unless `--with-jpeg=no'. |
1831 HAVE_JPEG=no | 1832 HAVE_JPEG=no |
1832 if test "${HAVE_X11}" = "yes"; then | 1833 if test "${HAVE_X11}" = "yes"; then |
1833 if test "${with_jpeg}" != "no"; then | 1834 if test "${with_jpeg}" != "no"; then |
1834 old_c_flags="${CFLAGS}" | |
1835 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}" | |
1836 dnl Checking for jpeglib.h can lose becsue of a redefinition of | 1835 dnl Checking for jpeglib.h can lose becsue of a redefinition of |
1837 dnl HAVE_STDLIB_H. | 1836 dnl HAVE_STDLIB_H. |
1838 AC_CHECK_HEADER(jerror.h, | 1837 AC_CHECK_HEADER(jerror.h, |
1839 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes, , -lX11)) | 1838 AC_CHECK_LIB(jpeg, jpeg_destroy_compress, HAVE_JPEG=yes)) |
1840 CFLAGS="${old_c_flags}" | |
1841 fi | 1839 fi |
1842 | 1840 |
1843 if test "${HAVE_JPEG}" = "yes"; then | 1841 if test "${HAVE_JPEG}" = "yes"; then |
1844 AC_DEFINE(HAVE_JPEG) | 1842 AC_DEFINE(HAVE_JPEG) |
1845 fi | 1843 fi |
1847 | 1845 |
1848 ### Use -lpng if available, unless `--with-png=no'. | 1846 ### Use -lpng if available, unless `--with-png=no'. |
1849 HAVE_PNG=no | 1847 HAVE_PNG=no |
1850 if test "${HAVE_X11}" = "yes"; then | 1848 if test "${HAVE_X11}" = "yes"; then |
1851 if test "${with_png}" != "no"; then | 1849 if test "${with_png}" != "no"; then |
1852 old_c_flags="${CFLAGS}" | |
1853 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}" | |
1854 AC_CHECK_HEADER(png.h, | 1850 AC_CHECK_HEADER(png.h, |
1855 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lX11 -lz -lm)) | 1851 AC_CHECK_LIB(png, png_get_channels, HAVE_PNG=yes, , -lz -lm)) |
1856 CFLAGS="${old_c_flags}" | |
1857 fi | 1852 fi |
1858 | 1853 |
1859 if test "${HAVE_PNG}" = "yes"; then | 1854 if test "${HAVE_PNG}" = "yes"; then |
1860 AC_DEFINE(HAVE_PNG) | 1855 AC_DEFINE(HAVE_PNG) |
1861 fi | 1856 fi |
1863 | 1858 |
1864 ### Use -ltiff if available, unless `--with-tiff=no'. | 1859 ### Use -ltiff if available, unless `--with-tiff=no'. |
1865 HAVE_TIFF=no | 1860 HAVE_TIFF=no |
1866 if test "${HAVE_X11}" = "yes"; then | 1861 if test "${HAVE_X11}" = "yes"; then |
1867 if test "${with_tiff}" != "no"; then | 1862 if test "${with_tiff}" != "no"; then |
1868 old_c_flags="${CFLAGS}" | |
1869 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}" | |
1870 AC_CHECK_HEADER(tiffio.h, | 1863 AC_CHECK_HEADER(tiffio.h, |
1871 tifflibs="-lX11 -lz -lm" | 1864 tifflibs="-lz -lm" |
1872 # At least one tiff package requires the jpeg library. | 1865 # At least one tiff package requires the jpeg library. |
1873 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi | 1866 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi |
1874 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs)) | 1867 AC_CHECK_LIB(tiff, TIFFGetVersion, HAVE_TIFF=yes, , $tifflibs)) |
1875 CFLAGS="${old_c_flags}" | |
1876 fi | 1868 fi |
1877 | 1869 |
1878 if test "${HAVE_TIFF}" = "yes"; then | 1870 if test "${HAVE_TIFF}" = "yes"; then |
1879 AC_DEFINE(HAVE_TIFF) | 1871 AC_DEFINE(HAVE_TIFF) |
1880 fi | 1872 fi |
1882 | 1874 |
1883 ### Use -lgif if available, unless `--with-gif=no'. | 1875 ### Use -lgif if available, unless `--with-gif=no'. |
1884 HAVE_GIF=no | 1876 HAVE_GIF=no |
1885 if test "${HAVE_X11}" = "yes"; then | 1877 if test "${HAVE_X11}" = "yes"; then |
1886 if test "${with_gif}" != "no"; then | 1878 if test "${with_gif}" != "no"; then |
1887 old_c_flags="${CFLAGS}" | |
1888 CFLAGS="${LD_SWITCH_X_SITE} ${CFLAGS}" | |
1889 AC_CHECK_HEADER(gif_lib.h, | 1879 AC_CHECK_HEADER(gif_lib.h, |
1890 AC_CHECK_LIB(ungif, DGifOpen, HAVE_GIF=yes, , -lX11)) | 1880 AC_CHECK_LIB(ungif, DGifOpen, HAVE_GIF=yes)) |
1891 CFLAGS="${old_c_flags}" | |
1892 fi | 1881 fi |
1893 | 1882 |
1894 if test "${HAVE_GIF}" = "yes"; then | 1883 if test "${HAVE_GIF}" = "yes"; then |
1895 AC_DEFINE(HAVE_GIF) | 1884 AC_DEFINE(HAVE_GIF) |
1896 fi | 1885 fi |