summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng.ac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-16 00:09:26 +0000
committerKarl Berry <karl@freefriends.org>2006-01-16 00:09:26 +0000
commit6c0eafbb1395d426a72a74538e0b2a95e8344ca6 (patch)
tree2a5f80b80fc76086a2602b812c2a182d00f961b7 /Build/source/libs/libpng/libpng.ac
parent70f7efeb5c9965a63a4143ad1c1f473585dc364c (diff)
libs 1
git-svn-id: svn://tug.org/texlive/trunk@1483 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng/libpng.ac')
-rw-r--r--Build/source/libs/libpng/libpng.ac52
1 files changed, 52 insertions, 0 deletions
diff --git a/Build/source/libs/libpng/libpng.ac b/Build/source/libs/libpng/libpng.ac
new file mode 100644
index 00000000000..eda70ebb9fa
--- /dev/null
+++ b/Build/source/libs/libpng/libpng.ac
@@ -0,0 +1,52 @@
+if test "$needs_pnglib" = no; then
+ LIBPNGCPPFLAGS=
+ LDLIBPNG=
+ LIBPNGDEP=
+else
+ EXTRA_LIBPNG_INCLUDE=
+ EXTRA_LIBPNG_LIBDIR=
+
+ if test "$with_system_pnglib" = yes; then
+ if test "x$with_pnglib_libdir" != x; then
+ EXTRA_LIBPNG_LIBDIR="-L$with_pnglib_libdir"
+ fi
+ if test "x$with_pnglib_include" != x; then
+ EXTRA_LIBPNG_INCLUDE="-I$with_pnglib_include"
+ fi
+ fi
+
+ OLD_LDFLAGS=$LDFLAGS
+ OLD_CPP=$CPP
+ OLD_LIBS=$LIBS
+
+ LDFLAGS="$LDFLAGS $EXTRA_LIBPNG_LIBDIR"
+ CPP="$CPP $EXTRA_LIBPNG_INCLUDE"
+
+ if test "$with_system_pnglib" = yes; then
+ AC_CHECK_LIB(png, png_set_read_fn,
+ pnglib=-lpng,
+ AC_MSG_WARN(Standard PNG library not found. Compiling my own.)
+ with_system_pnglib=no,
+ -lz -lm)
+ fi
+
+ LDFLAGS=$OLD_LDFLAGS
+ CPP=$OLD_CPP
+ LIBS=$OLD_LIBS
+
+ if test "$with_system_pnglib" != yes; then
+ LIBPNGCPPFLAGS='-I$(LIBPNGDIR) -I$(LIBPNGSRCDIR)'
+ LDLIBPNG='$(LIBPNGDIR)/libpng.a'
+ LIBPNGDEP='$(LIBPNGDIR)/libpng.a'
+ using_system_pnglib=no
+ else
+ LIBPNGCPPFLAGS="$EXTRA_LIBPNG_INCLUDE"
+ LDLIBPNG="$EXTRA_LIBPNG_LIBDIR -lpng"
+ LIBPNGDEP=
+ using_system_pnglib=yes
+ fi
+fi
+
+AC_SUBST(LIBPNGCPPFLAGS)
+AC_SUBST(LDLIBPNG)
+AC_SUBST(LIBPNGDEP)