forked from old/legacy-imlib2
autofoo: Move more to pkg-config
Facilitates testing alternative library versions.
This commit is contained in:
parent
27ab891c56
commit
c1ee164d6d
61
configure.ac
61
configure.ac
|
@ -142,13 +142,7 @@ AC_ARG_WITH([jpeg],
|
||||||
AC_MSG_RESULT($jpeg_loader)
|
AC_MSG_RESULT($jpeg_loader)
|
||||||
|
|
||||||
if test "$jpeg_loader" != no ; then
|
if test "$jpeg_loader" != no ; then
|
||||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, jpeg_ok=yes, jpeg_ok=no)
|
PKG_CHECK_MODULES(JPEG, libjpeg, [ jpeg_ok="yes" ], [ jpeg_ok="no" ])
|
||||||
if test "$jpeg_ok" = yes; then
|
|
||||||
AC_CHECK_HEADER([jpeglib.h], , jpeg_ok=no)
|
|
||||||
if test "$jpeg_ok" = yes; then
|
|
||||||
JPEGLIBS="-ljpeg"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$jpeg_ok" = no ; then
|
if test "$jpeg_ok" = no ; then
|
||||||
if test "$jpeg_loader" = yes ; then
|
if test "$jpeg_loader" = yes ; then
|
||||||
AC_MSG_ERROR(JPEG support was requested but system does not support it)
|
AC_MSG_ERROR(JPEG support was requested but system does not support it)
|
||||||
|
@ -160,7 +154,6 @@ else
|
||||||
jpeg_ok=no
|
jpeg_ok=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_JPEG_LOADER, test "$jpeg_ok" = yes)
|
AM_CONDITIONAL(BUILD_JPEG_LOADER, test "$jpeg_ok" = yes)
|
||||||
AC_SUBST(JPEGLIBS)
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to enable png support)
|
AC_MSG_CHECKING(whether to enable png support)
|
||||||
|
@ -225,25 +218,7 @@ AC_ARG_WITH([tiff],
|
||||||
AC_MSG_RESULT($tiff_loader)
|
AC_MSG_RESULT($tiff_loader)
|
||||||
|
|
||||||
if test "$tiff_loader" != no ; then
|
if test "$tiff_loader" != no ; then
|
||||||
AC_CHECK_LIB(tiff, TIFFReadScanline,
|
PKG_CHECK_MODULES(TIFF, libtiff-4, [ tiff_ok="yes" ], [ tiff_ok="no" ])
|
||||||
tiff_libs="-ltiff"
|
|
||||||
tiff_ok=yes,
|
|
||||||
AC_CHECK_LIB(tiff, TIFFReadScanline,
|
|
||||||
tiff_libs="-ltiff -ljpeg -lz -lm"
|
|
||||||
tiff_ok=yes,
|
|
||||||
AC_CHECK_LIB(tiff34, TIFFReadScanline,
|
|
||||||
tiff_libs="-ltiff34 -ljpeg -lz -lm"
|
|
||||||
tiff_ok=yes,
|
|
||||||
tiff_ok=no,
|
|
||||||
-ljpeg -lz -lm),
|
|
||||||
-ljpeg -lz -lm),
|
|
||||||
)
|
|
||||||
if test "$tiff_ok" = yes; then
|
|
||||||
AC_CHECK_HEADER([tiffio.h], , tiff_ok=no)
|
|
||||||
if test "$tiff_ok" = yes; then
|
|
||||||
TIFFLIBS=$tiff_libs
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$tiff_ok" = no ; then
|
if test "$tiff_ok" = no ; then
|
||||||
if test "$tiff_loader" = yes ; then
|
if test "$tiff_loader" = yes ; then
|
||||||
AC_MSG_ERROR(TIFF support was requested but system does not support it)
|
AC_MSG_ERROR(TIFF support was requested but system does not support it)
|
||||||
|
@ -255,7 +230,6 @@ else
|
||||||
tiff_ok=no
|
tiff_ok=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_TIFF_LOADER, test "$tiff_ok" = yes)
|
AM_CONDITIONAL(BUILD_TIFF_LOADER, test "$tiff_ok" = yes)
|
||||||
AC_SUBST(TIFFLIBS)
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to enable gif support)
|
AC_MSG_CHECKING(whether to enable gif support)
|
||||||
|
@ -332,13 +306,7 @@ AC_ARG_WITH([zlib],
|
||||||
AC_MSG_RESULT($zlib_loader)
|
AC_MSG_RESULT($zlib_loader)
|
||||||
|
|
||||||
if test "$zlib_loader" != no ; then
|
if test "$zlib_loader" != no ; then
|
||||||
AC_CHECK_LIB(z, uncompress, zlib_ok=yes, zlib_ok=no)
|
PKG_CHECK_MODULES(ZLIB, zlib, [ zlib_ok="yes" ], [ zlib_ok="no" ])
|
||||||
if test "$zlib_ok" = yes; then
|
|
||||||
AC_CHECK_HEADER([zlib.h], , zlib_ok=no)
|
|
||||||
if test "$zlib_ok" = yes; then
|
|
||||||
ZLIBLIBS="-lz"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$zlib_ok" = no ; then
|
if test "$zlib_ok" = no ; then
|
||||||
if test "$zlib_loader" = yes ; then
|
if test "$zlib_loader" = yes ; then
|
||||||
AC_MSG_ERROR(ZLIB support was requested but system does not support it)
|
AC_MSG_ERROR(ZLIB support was requested but system does not support it)
|
||||||
|
@ -350,7 +318,6 @@ else
|
||||||
zlib_ok=no
|
zlib_ok=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_ZLIB_LOADER, test "$zlib_ok" = yes)
|
AM_CONDITIONAL(BUILD_ZLIB_LOADER, test "$zlib_ok" = yes)
|
||||||
AC_SUBST(ZLIBLIBS)
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to enable bzip2 support)
|
AC_MSG_CHECKING(whether to enable bzip2 support)
|
||||||
|
@ -368,13 +335,7 @@ AC_ARG_WITH([bzip2],
|
||||||
AC_MSG_RESULT($bz2_loader)
|
AC_MSG_RESULT($bz2_loader)
|
||||||
|
|
||||||
if test "$bz2_loader" != no ; then
|
if test "$bz2_loader" != no ; then
|
||||||
AC_CHECK_LIB(bz2, BZ2_bzRead, bz2_ok=yes, bz2_ok=no)
|
PKG_CHECK_MODULES(BZ2, bzip2, [ bz2_ok="yes" ], [ bz2_ok="no" ])
|
||||||
if test "$bz2_ok" = yes; then
|
|
||||||
AC_CHECK_HEADER([bzlib.h], , bz2_ok=no)
|
|
||||||
if test "$bz2_ok" = yes; then
|
|
||||||
BZ2LIBS="-lbz2"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$bz2_ok" = no ; then
|
if test "$bz2_ok" = no ; then
|
||||||
if test "$bz2_loader" = yes ; then
|
if test "$bz2_loader" = yes ; then
|
||||||
AC_MSG_ERROR(BZIP2 support was requested but system does not support it)
|
AC_MSG_ERROR(BZIP2 support was requested but system does not support it)
|
||||||
|
@ -386,7 +347,6 @@ else
|
||||||
bz2_ok=no
|
bz2_ok=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_BZ2_LOADER, test "$bz2_ok" = yes)
|
AM_CONDITIONAL(BUILD_BZ2_LOADER, test "$bz2_ok" = yes)
|
||||||
AC_SUBST(BZ2LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether to enable id3 support)
|
AC_MSG_CHECKING(whether to enable id3 support)
|
||||||
|
@ -404,17 +364,7 @@ AC_ARG_WITH([id3],
|
||||||
AC_MSG_RESULT($id3_loader)
|
AC_MSG_RESULT($id3_loader)
|
||||||
|
|
||||||
if test "$id3_loader" != no ; then
|
if test "$id3_loader" != no ; then
|
||||||
AC_CHECK_LIB(id3tag, id3_file_open,
|
PKG_CHECK_MODULES(ID3, id3tag, [ id3_ok="yes" ], [ id3_ok="no" ])
|
||||||
id3_libs="-lz -lid3tag"
|
|
||||||
id3_ok=yes,
|
|
||||||
id3_ok=no,
|
|
||||||
-lz)
|
|
||||||
if test "$id3_ok" = yes; then
|
|
||||||
AC_CHECK_HEADER([id3tag.h], , id3_ok=no)
|
|
||||||
if test "$id3_ok" = yes; then
|
|
||||||
ID3LIBS=$id3_libs
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$id3_ok" = no ; then
|
if test "$id3_ok" = no ; then
|
||||||
if test "$id3_loader" = yes ; then
|
if test "$id3_loader" = yes ; then
|
||||||
AC_MSG_ERROR(ID3 support was requested but system does not support it)
|
AC_MSG_ERROR(ID3 support was requested but system does not support it)
|
||||||
|
@ -426,7 +376,6 @@ else
|
||||||
id3_ok=no
|
id3_ok=no
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
|
AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
|
||||||
AC_SUBST(ID3LIBS)
|
|
||||||
|
|
||||||
|
|
||||||
EC_C_WARNINGS()
|
EC_C_WARNINGS()
|
||||||
|
|
|
@ -62,8 +62,9 @@ bmp_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||||
bmp_la_LIBTOOLFLAGS = --tag=disable-static
|
bmp_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
bz2_la_SOURCES = loader_bz2.c
|
bz2_la_SOURCES = loader_bz2.c
|
||||||
|
bz2_la_CPPFLAGS = $(BZ2_CFLAGS) $(AM_CPPFLAGS)
|
||||||
bz2_la_LDFLAGS = -module -avoid-version
|
bz2_la_LDFLAGS = -module -avoid-version
|
||||||
bz2_la_LIBADD = @BZ2LIBS@ $(top_builddir)/src/lib/libImlib2.la
|
bz2_la_LIBADD = $(BZ2_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
bz2_la_LIBTOOLFLAGS = --tag=disable-static
|
bz2_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
ff_la_SOURCES = loader_ff.c
|
ff_la_SOURCES = loader_ff.c
|
||||||
|
@ -82,13 +83,15 @@ ico_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||||
ico_la_LIBTOOLFLAGS = --tag=disable-static
|
ico_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
id3_la_SOURCES = loader_id3.c
|
id3_la_SOURCES = loader_id3.c
|
||||||
|
id3_la_CPPFLAGS = $(ID3_CFLAGS) $(AM_CPPFLAGS)
|
||||||
id3_la_LDFLAGS = -module -avoid-version
|
id3_la_LDFLAGS = -module -avoid-version
|
||||||
id3_la_LIBADD = @ID3LIBS@ $(top_builddir)/src/lib/libImlib2.la
|
id3_la_LIBADD = $(ID3_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
id3_la_LIBTOOLFLAGS = --tag=disable-static
|
id3_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
jpeg_la_SOURCES = loader_jpeg.c
|
jpeg_la_SOURCES = loader_jpeg.c
|
||||||
|
jpeg_la_CPPFLAGS = $(JPEG_CFLAGS) $(AM_CPPFLAGS)
|
||||||
jpeg_la_LDFLAGS = -module -avoid-version
|
jpeg_la_LDFLAGS = -module -avoid-version
|
||||||
jpeg_la_LIBADD = @JPEGLIBS@ $(top_builddir)/src/lib/libImlib2.la
|
jpeg_la_LIBADD = $(JPEG_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
jpeg_la_LIBTOOLFLAGS = --tag=disable-static
|
jpeg_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
lbm_la_SOURCES = loader_lbm.c
|
lbm_la_SOURCES = loader_lbm.c
|
||||||
|
@ -97,9 +100,9 @@ lbm_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||||
lbm_la_LIBTOOLFLAGS = --tag=disable-static
|
lbm_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
png_la_SOURCES = loader_png.c
|
png_la_SOURCES = loader_png.c
|
||||||
png_la_CPPFLAGS = @PNG_CFLAGS@ $(AM_CPPFLAGS)
|
png_la_CPPFLAGS = $(PNG_CFLAGS) $(AM_CPPFLAGS)
|
||||||
png_la_LDFLAGS = -module -avoid-version
|
png_la_LDFLAGS = -module -avoid-version
|
||||||
png_la_LIBADD = @PNG_LIBS@ $(top_builddir)/src/lib/libImlib2.la
|
png_la_LIBADD = $(PNG_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
png_la_LIBTOOLFLAGS = --tag=disable-static
|
png_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
pnm_la_SOURCES = loader_pnm.c
|
pnm_la_SOURCES = loader_pnm.c
|
||||||
|
@ -113,14 +116,15 @@ tga_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||||
tga_la_LIBTOOLFLAGS = --tag=disable-static
|
tga_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
tiff_la_SOURCES = loader_tiff.c
|
tiff_la_SOURCES = loader_tiff.c
|
||||||
|
tiff_la_CPPFLAGS = $(TIFF_CFLAGS) $(AM_CPPFLAGS)
|
||||||
tiff_la_LDFLAGS = -module -avoid-version
|
tiff_la_LDFLAGS = -module -avoid-version
|
||||||
tiff_la_LIBADD = @TIFFLIBS@ $(top_builddir)/src/lib/libImlib2.la
|
tiff_la_LIBADD = $(TIFF_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
tiff_la_LIBTOOLFLAGS = --tag=disable-static
|
tiff_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
webp_la_SOURCES = loader_webp.c
|
webp_la_SOURCES = loader_webp.c
|
||||||
webp_la_CPPFLAGS = @WEBP_CFLAGS@ $(AM_CPPFLAGS)
|
webp_la_CPPFLAGS = $(WEBP_CFLAGS) $(AM_CPPFLAGS)
|
||||||
webp_la_LDFLAGS = -module -avoid-version
|
webp_la_LDFLAGS = -module -avoid-version
|
||||||
webp_la_LIBADD = @WEBP_LIBS@ $(top_builddir)/src/lib/libImlib2.la
|
webp_la_LIBADD = $(WEBP_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
webp_la_LIBTOOLFLAGS = --tag=disable-static
|
webp_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
xbm_la_SOURCES = loader_xbm.c
|
xbm_la_SOURCES = loader_xbm.c
|
||||||
|
@ -134,6 +138,7 @@ xpm_la_LIBADD = $(top_builddir)/src/lib/libImlib2.la
|
||||||
xpm_la_LIBTOOLFLAGS = --tag=disable-static
|
xpm_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
zlib_la_SOURCES = loader_zlib.c
|
zlib_la_SOURCES = loader_zlib.c
|
||||||
|
zlib_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
|
||||||
zlib_la_LDFLAGS = -module -avoid-version
|
zlib_la_LDFLAGS = -module -avoid-version
|
||||||
zlib_la_LIBADD = @ZLIBLIBS@ $(top_builddir)/src/lib/libImlib2.la
|
zlib_la_LIBADD = $(ZLIB_LIBS) $(top_builddir)/src/lib/libImlib2.la
|
||||||
zlib_la_LIBTOOLFLAGS = --tag=disable-static
|
zlib_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
Loading…
Reference in New Issue