about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile6
-rwxr-xr-xtest/all-in-place.test13
-rwxr-xr-xtest/legacy-names.test22
-rwxr-xr-xtest/png-roundtrip.test4
-rwxr-xr-xtest/png-roundtrip2.test4
-rwxr-xr-xtest/ps-roundtrip.test4
6 files changed, 52 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile
index aac9c0c9..4e10e12c 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -463,8 +463,12 @@ CHECK_VARS = \
 	JASPERLIB="$(JASPERLIB)" \
 	JBIGLIB="$(JBIGLIB)" \
 	JPEGLIB="$(JPEGLIB)" \
+	PNGLIB="$(PNGLIB)" \
 	TIFFLIB="$(TIFFLIB)" \
-	URTLIB="$(URTLIB)"
+	URTLIB="$(URTLIB)" \
+	X11LIB="$(X11LIB)" \
+	XML2_LIBS="$(XML2_LIBS)" \
+	ZLIB="$(ZLIB)"
 
 # Test files in source tree.
 
diff --git a/test/all-in-place.test b/test/all-in-place.test
index 1a6b30c1..adcfa6d5 100755
--- a/test/all-in-place.test
+++ b/test/all-in-place.test
@@ -386,6 +386,16 @@ enabled_testprog() {
       ppmtojpeg)
         [ "${JPEGLIB}" = "NONE" ] && return 1 ;;
 
+      pamtopng|\
+      pngtopam|\
+      pnmtopng)
+        [ "${PNGLIB}" = "NONE" ] && return 1 ;;
+
+      svgtopam)
+        [ "${PNGLIB}" = "NONE" ] && return 1
+        [ "${XML2_LIBS}" = "NONE" ] && return 1
+        ;;
+
       pamtotiff|\
       pnmtotiffcmyk|\
       tifftopnm)
@@ -394,6 +404,9 @@ enabled_testprog() {
       pnmtorle|\
       rletopnm)
         [ "${URTLIB}" = "NONE" ] && return 1 ;;
+
+      pamx)
+        [ "${X11LIB}" = "NONE" ] && return 1 ;;
     esac
 
     return 0
diff --git a/test/legacy-names.test b/test/legacy-names.test
index 30509d20..8dbd97b4 100755
--- a/test/legacy-names.test
+++ b/test/legacy-names.test
@@ -94,8 +94,30 @@ ordinary_testprogs="\
   ppmtouil \
 "
 
+enabled_testprog() {
+    case $1 in
+      ppmtojpeg)
+        [ "${JPEGLIB}" = "NONE" ] && return 1 ;;
+
+      pamrgbatopng|\
+      pngtopnm)
+        [ "${PNGLIB}" = "NONE" ] && return 1 ;;
+
+      pnmtotiff)
+        [ "${TIFFLIB}" = "NONE" ] && return 1 ;;
+    esac
+
+    return 0
+}
+
 for i in $ordinary_testprogs
   do
+    # Stub out programs that aren't built.
+    if ! enabled_testprog "$i"; then
+      echo "$i: ok"
+      continue
+    fi
+
     $i --version  2>&1 | \
     egrep -v \
     "(Using libnetpbm|Compiled|(BSD|SYSV|MSDOS|AMIGA) defined|RGB_?ENV=)" \
diff --git a/test/png-roundtrip.test b/test/png-roundtrip.test
index 7e7c4a9b..d1b3dd76 100755
--- a/test/png-roundtrip.test
+++ b/test/png-roundtrip.test
@@ -6,6 +6,10 @@
 ## If this test fails and pnm-roundtrip2.test succeeds, it indicates
 ## some problem with pnmtopng.
 
+if [ "${PNGLIB}" = "NONE" ]; then
+  exit 80
+fi
+
 # Test 1.  Should print 1926073387 101484 18 times
 for flags in "" -interlace \
   -gamma=.45 \
diff --git a/test/png-roundtrip2.test b/test/png-roundtrip2.test
index af2ad029..b48bbf91 100755
--- a/test/png-roundtrip2.test
+++ b/test/png-roundtrip2.test
@@ -9,6 +9,10 @@
 ## If both tests fail, the likely cause is a problem with pngtopam.
 ## It is also possible that there is some problem in libpng.
 
+if [ "${PNGLIB}" = "NONE" ]; then
+  exit 80
+fi
+
 # Test 1.  Should print 1926073387 101484 twice
 for flags in "" -gamma=.45
   do
diff --git a/test/ps-roundtrip.test b/test/ps-roundtrip.test
index 873bbdef..345795ff 100755
--- a/test/ps-roundtrip.test
+++ b/test/ps-roundtrip.test
@@ -8,6 +8,10 @@
 ## (1) zlib was not linked.
 ## (2) ghostscript is not available.
 
+if [ "${ZLIB}" = "NONE" ]; then
+  exit 80
+fi
+
 tmpdir=${tmpdir:-/tmp}
 
 # pstopnm does not use libnetpbm functions for output.