summaryrefslogtreecommitdiff
blob: 766a3b84ea8ceb958ea7dce4f3f16f565efdb8ad (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
79
80
81
82
83
84
85
diff -Naur pilot-link-0.12.2.orig/configure.ac pilot-link-0.12.2/configure.ac
--- pilot-link-0.12.2.orig/configure.ac	2007-02-09 22:50:17.000000000 +0100
+++ pilot-link-0.12.2/configure.ac	2007-08-25 17:38:42.000000000 +0200
@@ -220,47 +220,52 @@
 dnl ******************************
 dnl PNG Support
 dnl ******************************
+msg_png=no
 if test "x$enable_conduits" != "xno"; then
 	have_png=no
 
 	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
+
+		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"
 
-	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)
+		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
+				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
-	fi
 
-	CFLAGS="$save_CFLAGS"
-	CPPFLAGS="$save_CPPFLAGS"
-	LDFLAGS="$save_LDFLAGS"
+		CFLAGS="$save_CFLAGS"
+		CPPFLAGS="$save_CPPFLAGS"
+		LDFLAGS="$save_LDFLAGS"
+	fi
 else
 	have_png="none"
 	PNG_CFLAGS=