comparison configure.in @ 81316:b1c3e248f6cd

(HAVE_GIF): If -lungif fails, try -lgif.
author Glenn Morris <rgm@gnu.org>
date Tue, 12 Jun 2007 08:12:52 +0000
parents f534f4faa9e2
children ed0e578fd01a
comparison
equal deleted inserted replaced
81315:19cac94ab3b0 81316:b1c3e248f6cd
108 AC_ARG_WITH(jpeg, 108 AC_ARG_WITH(jpeg,
109 [ --with-jpeg use -ljpeg for displaying JPEG images]) 109 [ --with-jpeg use -ljpeg for displaying JPEG images])
110 AC_ARG_WITH(tiff, 110 AC_ARG_WITH(tiff,
111 [ --with-tiff use -ltiff for displaying TIFF images]) 111 [ --with-tiff use -ltiff for displaying TIFF images])
112 AC_ARG_WITH(gif, 112 AC_ARG_WITH(gif,
113 [ --with-gif use -lungif for displaying GIF images]) 113 [ --with-gif use -lungif (or -lgif) for displaying GIF images])
114 AC_ARG_WITH(png, 114 AC_ARG_WITH(png,
115 [ --with-png use -lpng for displaying PNG images]) 115 [ --with-png use -lpng for displaying PNG images])
116 AC_ARG_WITH(gpm, 116 AC_ARG_WITH(gpm,
117 [ --with-gpm use -lgpm for mouse support on a GNU/Linux console]) 117 [ --with-gpm use -lgpm for mouse support on a GNU/Linux console])
118 AC_ARG_WITH(gtk, 118 AC_ARG_WITH(gtk,
2525 if test "${HAVE_TIFF}" = "yes"; then 2525 if test "${HAVE_TIFF}" = "yes"; then
2526 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).]) 2526 AC_DEFINE(HAVE_TIFF, 1, [Define to 1 if you have the tiff library (-ltiff).])
2527 fi 2527 fi
2528 fi 2528 fi
2529 2529
2530 ### Use -lgif if available, unless `--with-gif=no'. 2530 ### Use -lgif or -lungif if available, unless `--with-gif=no'.
2531 HAVE_GIF=no 2531 HAVE_GIF=no
2532 if test "${HAVE_X11}" = "yes"; then 2532 if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
2533 if test "${with_gif}" != "no"; then 2533 AC_CHECK_HEADER(gif_lib.h,
2534 AC_CHECK_HEADER(gif_lib.h,
2535 # EGifPutExtensionLast only exists from version libungif-4.1.0b1. 2534 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
2536 # Earlier versions can crash Emacs. 2535 # Earlier versions can crash Emacs.
2537 AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes)) 2536 AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes, try_libgif=yes))
2537
2538 if test "$HAVE_GIF" = yes; then
2539 ac_gif_lib_name="-lungif"
2540 fi
2541
2542 # If gif_lib.h but no libungif, try libgif.
2543 if test x"$try_libgif" = xyes; then
2544 AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes)
2545
2546 if test "$HAVE_GIF" = yes; then
2547 AC_DEFINE(LIBGIF, -lgif, [Compiler option to link with the gif library (if not -lungif).])
2548 ac_gif_lib_name="-lgif"
2549 fi
2538 fi 2550 fi
2539 2551
2540 if test "${HAVE_GIF}" = "yes"; then 2552 if test "${HAVE_GIF}" = "yes"; then
2541 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have the ungif library (-lungif).]) 2553 AC_DEFINE(HAVE_GIF, 1, [Define to 1 if you have a gif library (default -lungif; otherwise specify with LIBGIF).])
2542 fi 2554 fi
2543 fi 2555 fi
2544 2556
2545 ### Use -lgpm if available, unless `--with-gpm=no'. 2557 ### Use -lgpm if available, unless `--with-gpm=no'.
2546 HAVE_GPM=no 2558 HAVE_GPM=no
3309 3321
3310 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}" 3322 echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
3311 echo " Does Emacs use -lXpm? ${HAVE_XPM}" 3323 echo " Does Emacs use -lXpm? ${HAVE_XPM}"
3312 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" 3324 echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
3313 echo " Does Emacs use -ltiff? ${HAVE_TIFF}" 3325 echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
3314 echo " Does Emacs use -lungif? ${HAVE_GIF}" 3326 echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
3315 echo " Does Emacs use -lpng? ${HAVE_PNG}" 3327 echo " Does Emacs use -lpng? ${HAVE_PNG}"
3316 echo " Does Emacs use -lgpm? ${HAVE_GPM}" 3328 echo " Does Emacs use -lgpm? ${HAVE_GPM}"
3317 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}" 3329 echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
3318 echo 3330 echo
3319 3331