Mercurial > hg > xemacs-beta
diff configure.in @ 310:851ff35f137f r21-0b53
Import from CVS: tag r21-0b53
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:43:28 +0200 |
parents | 33bdb3d4b97f |
children | 512e409c26a2 |
line wrap: on
line diff
--- a/configure.in Mon Aug 13 10:42:45 2007 +0200 +++ b/configure.in Mon Aug 13 10:43:28 2007 +0200 @@ -2677,6 +2677,7 @@ AC_CHECKING(for graphics libraries) dnl Autodetect Xpm + xpm_problem="" if test -z "$with_xpm"; then AC_MSG_CHECKING(for Xpm - no older than 3.4f) xe_check_libs=-lXpm @@ -2686,22 +2687,22 @@ XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;}], [./conftest dummy_arg; xpm_status=$?; - if test "$?" = "0"; then + if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; - if test "$?" = "1"; then + if test "$xpm_status" = "1"; then xpm_problem="Xpm library version and header file version don't match!" - elif test "$?" = "2"; then + elif test "$xpm_status" = "2"; then xpm_problem="Xpm library version is too old!" else xpm_problem="Internal xpm detection logic error!" fi echo " -*** WARNING *** $problem +*** WARNING *** $xpm_problem I'm not touching that with a 10-foot pole! If you really want to use the installed version of Xpm, rerun - configure --with-xpm=yes, but don't blame me if XEmacs crashes!" + configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!" fi], [with_xpm=no]) xe_check_libs= @@ -2749,18 +2750,38 @@ fi dnl autodetect PNG + png_problem="" + test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } + test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) } + test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } if test -z "$with_png"; then - AC_MSG_CHECKING(for png.h - no older than 1.02) - AC_EGREP_CPP(yes, -[#include <png.h> -#if PNG_LIBPNG_VER >= 10002 -yes -#endif -], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); with_png=no]) + AC_MSG_CHECKING(for workable png version information) + xe_check_libs="-lpng -lz" + AC_TRY_RUN([#include <png.h> + int main(int c, char **v) { + if (c == 1) return 0; + if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; + return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}], + [./conftest dummy_arg; png_status=$?; + if test "$png_status" = "0"; then + with_png=yes; + else + with_png=no; + if test "$png_status" = "1"; then + png_problem="PNG library version and header file don't match!" + elif test "$png_status" = "2"; then + png_problem="PNG library version too old (pre 1.0.2)!" + fi + echo " +*** WARNING *** $png_problem + I'm not touching that with a 10-foot pole! + If you really want to use the installed version of libPNG, rerun + configure and add '--with-png=yes', but don't blame me if XEmacs crashes!" + fi], + [with_png=no]) + xe_check_libs= + AC_MSG_RESULT($with_png) fi - test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) } - test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) } - test -z "$with_png" && with_png=yes if test "$with_png" = "yes"; then AC_DEFINE(HAVE_PNG) XE_PREPEND(-lpng, libs_x) @@ -3924,25 +3945,31 @@ elif test "$with_x11" = yes; then echo " --------------------------------------------------------------------" echo " WARNING: Compiling without XPM support." + if test "$xpm_problem" != ""; then + echo " Reason: $xpm_problem" + fi echo " WARNING: You should strongly consider installing XPM." echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." - echo " WARNING: (a copy may be found at ftp://ftp.xemacs.org/pub/xemacs/aux)" + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" echo " --------------------------------------------------------------------" fi if test "$with_png" = yes; then echo " Compiling in support for PNG image handling." -else +elif test "$window_system" != "none"; then echo " --------------------------------------------------------------------" echo " WARNING: Compiling without PNG image support." + if test "$png_problem" != ""; then + echo " Reason: $png_problem" + fi echo " WARNING: You should strongly consider installing the PNG libraries." echo " WARNING: Otherwise certain images and glyphs may not display." - echo " WARNING: (a copy may be found at ftp://ftp.xemacs.org/pub/xemacs/aux)" + echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)" echo " --------------------------------------------------------------------" fi -test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." test "$with_gif" = yes && echo " Compiling in support for (builtin) GIF image handling." test "$with_jpeg" = yes && echo " Compiling in support for JPEG image handling." test "$with_tiff" = yes && echo " Compiling in support for TIFF image handling." +test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." case "$with_sound" in nas ) echo " Compiling in network sound (NAS) support." ;; native ) echo " Compiling in native sound support." ;;