Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 138836 | Differences between
and this patch

Collapse All | Expand All

(-)configure.ac.old (-36 / +43 lines)
Lines 195-246 Link Here
195
195
196
dnl these are technically optional
196
dnl these are technically optional
197
197
198
AC_MSG_CHECKING([for local zlib source])
199
dnl zlib is needed for language level 3, and libpng
198
dnl zlib is needed for language level 3, and libpng
199
AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[include zlib support (local, system, no) (required for PNG and language level 3]))
200
# we must define ZLIBDIR regardless because libpng.mak does a -I$(ZLIBDIR)
200
# we must define ZLIBDIR regardless because libpng.mak does a -I$(ZLIBDIR)
201
# this seems a harmless default
201
# this seems a harmless default
202
ZLIBDIR=src
202
ZLIBDIR=src
203
if test -d zlib; then
203
if test x$with_zlib != xno; then
204
	AC_MSG_RESULT([yes])
204
	AC_MSG_CHECKING([for local zlib source])
205
	SHARE_ZLIB=0
205
	if test x$with_zlib != xsystem && test -d zlib; then
206
	ZLIBDIR=zlib
206
		AC_MSG_RESULT([local])
207
else
207
		SHARE_ZLIB=0
208
	AC_MSG_RESULT([no])
208
		ZLIBDIR=zlib
209
	AC_CHECK_LIB(z, deflate, [
209
	else
210
	  AC_CHECK_HEADERS(zlib.h, [SHARE_ZLIB=1])
210
		AC_MSG_RESULT([system])
211
	])
211
		AC_CHECK_LIB(z, deflate, [
212
fi
212
		  AC_CHECK_HEADERS(zlib.h, [SHARE_ZLIB=1])
213
if test -z "$SHARE_ZLIB"; then
213
		])
214
  AC_MSG_ERROR([I did not find a copy of zlib on your system.
214
	fi
215
  Please either install it, or unpack a copy of the source in a
215
	if test -z "$SHARE_ZLIB"; then
216
  local directory named 'zlib'. See http://www.gzip.org/zlib/
216
	  AC_MSG_ERROR([I did not find a copy of zlib on your system.
217
  for more information.
217
	  Please either install it, or unpack a copy of the source in a
218
  ])
218
	  local directory named 'zlib'. See http://www.gzip.org/zlib/
219
	  for more information.
220
	  ])
221
	fi
219
fi
222
fi
220
AC_SUBST(SHARE_ZLIB)
223
AC_SUBST(SHARE_ZLIB)
221
AC_SUBST(ZLIBDIR)
224
AC_SUBST(ZLIBDIR)
222
225
223
dnl png for the png output device; it also requires zlib
226
dnl png for the png output device; it also requires zlib
224
LIBPNGDIR=src
227
AC_ARG_WITH(png, AC_HELP_STRING([--with-png],[include PNG support (local, system, no)]))
225
PNGDEVS=''
228
dnl set safe defaults
226
PNGDEVS_ALL='$(DD)png48.dev $(DD)png16m.dev $(DD)pnggray.dev $(DD)pngmono.dev $(DD)png256.dev $(DD)png16.dev $(DD)pngalpha.dev'
229
	LIBPNGDIR=src
227
AC_MSG_CHECKING([for local png library source])
230
	PNGDEVS=''
228
if test -f libpng/pngread.c; then
231
if test x$with_png != xno; then
229
	AC_MSG_RESULT([yes])
232
	PNGDEVS_ALL='$(DD)png48.dev $(DD)png16m.dev $(DD)pnggray.dev $(DD)pngmono.dev $(DD)png256.dev $(DD)png16.dev $(DD)pngalpha.dev'
230
	SHARE_LIBPNG=0
233
	AC_MSG_CHECKING([for local png library source])
231
	LIBPNGDIR=libpng
234
	if test x$with_png != xsystem && test -f libpng/pngread.c; then
232
	PNGDEVS="$PNGDEVS_ALL"
235
		AC_MSG_RESULT([local])
233
else
236
		SHARE_LIBPNG=0
234
	AC_MSG_RESULT([no])
237
		LIBPNGDIR=libpng
235
	AC_CHECK_LIB(png, png_check_sig, [
236
	  AC_CHECK_HEADERS(png.h, [
237
		SHARE_LIBPNG=1
238
		PNGDEVS="$PNGDEVS_ALL"
238
		PNGDEVS="$PNGDEVS_ALL"
239
	  ], [SHARE_LIBPNG=0])
239
	else
240
	], [SHARE_LIBPNG=0], [-lz])
240
		AC_MSG_RESULT([system])
241
fi
241
		AC_CHECK_LIB(png, png_check_sig, [
242
if test -z "$PNGDEVS"; then
242
		  AC_CHECK_HEADERS(png.h, [
243
  AC_MSG_NOTICE([disabling png output devices])
243
			SHARE_LIBPNG=1
244
			PNGDEVS="$PNGDEVS_ALL"
245
		  ], [SHARE_LIBPNG=0])
246
		], [SHARE_LIBPNG=0], [-lz])
247
	fi
248
	if test -z "$PNGDEVS"; then
249
	  AC_MSG_NOTICE([disabling png output devices])
250
	fi
244
fi
251
fi
245
AC_SUBST(SHARE_LIBPNG)
252
AC_SUBST(SHARE_LIBPNG)
246
AC_SUBST(LIBPNGDIR)
253
AC_SUBST(LIBPNGDIR)

Return to bug 138836