summaryrefslogtreecommitdiff
blob: 4de7b3a46b750cb5fd211d443c9e39ef52ebd237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -Naur pilot-link-0.12.3.orig/configure.ac pilot-link-0.12.3/configure.ac
--- pilot-link-0.12.3.orig/configure.ac	2007-11-09 20:36:37.000000000 +0100
+++ pilot-link-0.12.3/configure.ac	2007-12-19 21:38:27.000000000 +0100
@@ -225,42 +225,44 @@
 	AC_ARG_WITH(libpng,
 		[  --with-libpng           Prefix where libpng is installed])
 
-	case $with_libpng in
-		/*)
-		PNG_CFLAGS="-I$withval/include"
-		PNG_LIBS="-L$withval/lib"
-		;;
-	esac
+	if test "x$with_libpng" != "xno"; then
 
-	save_CFLAGS="$CFLAGS"
-	save_CPPFLAGS="$CPPFLAGS"
-	save_LDFLAGS="$LDFLAGS"
-	CFLAGS="$CFLAGS $PNG_CFLAGS"
-	CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
-	LDFLAGS="$LDFLAGS $PNG_LIBS"
-
-	AC_CHECK_LIB(png, main, [have_png=yes; PNG_LIBS="$PNG_LIBS -lpng"],[have_png=no],[-lm])
-	if test "$have_png" = yes; then
-		AC_CHECK_HEADER(png.h, , have_png=no)
+		case $with_libpng in
+			/*)
+			PNG_CFLAGS="-I$withval/include"
+			PNG_LIBS="-L$withval/lib"
+			;;
+		esac
+
+		save_CFLAGS="$CFLAGS"
+		save_CPPFLAGS="$CPPFLAGS"
+		save_LDFLAGS="$LDFLAGS"
+		CFLAGS="$CFLAGS $PNG_CFLAGS"
+		CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
+		LDFLAGS="$LDFLAGS $PNG_LIBS"
+
+		AC_CHECK_LIB(png, main, [have_png=yes; PNG_LIBS="$PNG_LIBS -lpng"],[have_png=no],[-lm])
 		if test "$have_png" = yes; then
-			AC_MSG_CHECKING(for png setjmp support)
-			AC_EGREP_CPP(yes,
-			[#include <png.h>
-			#ifdef PNG_SETJMP_SUPPORTED
-				yes
-			#endif], , have_png=no)
-			AC_MSG_RESULT($have_png)
+			AC_CHECK_HEADER(png.h, , have_png=no)
 			if test "$have_png" = yes; then
-				AC_DEFINE(HAVE_PNG, 1, [Define if we have PNG support])
-				have_png=yes
-				msg_png=yes
+				AC_MSG_CHECKING(for png setjmp support)
+				AC_EGREP_CPP(yes,
+				[#include <png.h>
+				#ifdef PNG_SETJMP_SUPPORTED
+					yes
+				#endif], , have_png=no)
+				AC_MSG_RESULT($have_png)
+				if test "$have_png" = yes; then
+					AC_DEFINE(HAVE_PNG, 1, [Define if we have PNG support])
+					have_png=yes
+					msg_png=yes
+				fi
 			fi
 		fi
+		CFLAGS="$save_CFLAGS"
+		CPPFLAGS="$save_CPPFLAGS"
+		LDFLAGS="$save_LDFLAGS"
 	fi
-
-	CFLAGS="$save_CFLAGS"
-	CPPFLAGS="$save_CPPFLAGS"
-	LDFLAGS="$save_LDFLAGS"
 else
 	have_png="none"
 	PNG_CFLAGS=