aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorreinelt <>2003-07-29 04:56:13 +0000
committerreinelt <>2003-07-29 04:56:13 +0000
commiteaa20ab6512e69a3f7cac0b8a7c840c430e5eb51 (patch)
tree8a45be4b879a10adfa2c2eb5b0943d4d919e6f75 /configure.in
parent6ea1ce26e69f1180806cd31f71a3e59091820371 (diff)
downloadlcd4linux-eaa20ab6512e69a3f7cac0b8a7c840c430e5eb51.tar.gz
[lcd4linux @ 2003-07-29 04:56:13 by reinelt]
disable Raster driver automagically if gd.h not found
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in22
1 files changed, 16 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 0950092..452695d 100644
--- a/configure.in
+++ b/configure.in
@@ -20,6 +20,9 @@ AC_CHECK_CURSES
# Checks for X11
AC_PATH_XTRA
+# check for gd.h
+AC_CHECK_HEADERS(gd/gd.h gd.h, [has_gd=true], [has_gd=false])
+
# drivers
AC_MSG_CHECKING([which drivers to compile])
AC_ARG_WITH(
@@ -172,14 +175,22 @@ if test "$PALMPILOT" = "yes"; then
fi
if test "$PNG" = "yes"; then
- RASTER="yes"
- AC_DEFINE(WITH_PNG,1,[junk])
- DRVLIBS="$DRVLIBS -lgd"
+ if test "$has_gd" = "true"; then
+ RASTER="yes"
+ AC_DEFINE(WITH_PNG,1,[junk])
+ DRVLIBS="$DRVLIBS -lgd"
+ else
+ AC_MSG_WARN(gd.h not found: PNG driver disabled)
+ fi
fi
if test "$PPM" = "yes"; then
- RASTER="yes"
- AC_DEFINE(WITH_PPM,1,[junk])
+ if test "$has_gd" = "true"; then
+ RASTER="yes"
+ AC_DEFINE(WITH_PPM,1,[junk])
+ else
+ AC_MSG_WARN(gd.h not found: PNG driver disabled)
+ fi
fi
if test "$SIN" = "yes"; then
@@ -237,7 +248,6 @@ AC_CHECK_HEADERS([fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/io
AC_CHECK_HEADERS(sys/io.h asm/io.h)
AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h)
AC_CHECK_HEADERS(linux/dvb/frontend.h)
-AC_CHECK_HEADERS(gd/gd.h gd.h)
AC_CHECK_HEADERS(net/if_ppp.h)
AC_CHECK_HEADERS(asm/msr.h)