forked from old/legacy-imlib2
Autofoo updates.
- Eliminate deprecated AC_TRY_CPP. - Use pkg-config in stead of freetype-config to get freetype info. - Eliminate my_includes/my_libs. - Clean up include paths.
This commit is contained in:
parent
e81eec2961
commit
fe82b9760c
134
configure.ac
134
configure.ac
|
@ -35,6 +35,8 @@ VERSION_AGE=4
|
|||
lt_version=${VERSION_CUR}:${VERSION_REV}:${VERSION_AGE}
|
||||
AC_SUBST(lt_version)
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
|
||||
mmx=no
|
||||
amd64=no
|
||||
|
@ -89,19 +91,10 @@ AC_MSG_RESULT($amd64)
|
|||
AM_CONDITIONAL(BUILD_AMD64, test x$amd64 = xyes)
|
||||
|
||||
# check for freetype
|
||||
AC_ARG_WITH(freetype-config,
|
||||
[AS_HELP_STRING([--with-freetype-config], [use freetype-config specified])],
|
||||
[ FREETYPE_CONFIG=$withval;
|
||||
echo "using "$FREETYPE_CONFIG" for freetype-config"; ],
|
||||
[ if test -z "$FREETYPE_CONFIG"; then
|
||||
AC_PATH_PROG(FREETYPE_CONFIG, "freetype-config", "", $PATH)
|
||||
fi
|
||||
]
|
||||
)
|
||||
freetype_cflags=`$FREETYPE_CONFIG --cflags`
|
||||
freetype_libs=`$FREETYPE_CONFIG --libs`
|
||||
PKG_CHECK_MODULES(FREETYPE, freetype2)
|
||||
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
if test "x$have_x" = "xno"; then
|
||||
# If --without-x was passed, this will be "disabled" instead of "no" --
|
||||
|
@ -112,25 +105,14 @@ path on your system, or --without-x to disable X support.])
|
|||
fi
|
||||
|
||||
if test "x$have_x" = "xyes"; then
|
||||
AC_PATH_XTRA
|
||||
x_cflags=$X_CFLAGS
|
||||
x_libs=$X_LIBS" -lX11 -lXext"
|
||||
AC_DEFINE(BUILD_X11, 1, [enabling X11 support])
|
||||
else
|
||||
x_cflags=""
|
||||
x_libs=""
|
||||
have_x="no"
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_X11, test "x$have_x" = "xyes")
|
||||
|
||||
dlopen_libs=""
|
||||
AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
|
||||
|
||||
my_includes=$freetype_cflags" "$x_cflags" "
|
||||
my_libs=$freetype_libs" "$x_libs" "$dlopen_libs" -lm"
|
||||
AC_SUBST(my_includes)
|
||||
AC_SUBST(my_libs)
|
||||
|
||||
AC_CHECK_LIB(dl, dlopen, DLOPEN_LIBS=-ldl)
|
||||
AC_SUBST(DLOPEN_LIBS)
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable jpeg support)
|
||||
|
@ -148,20 +130,9 @@ AC_ARG_WITH([jpeg],
|
|||
AC_MSG_RESULT($jpeg_loader)
|
||||
|
||||
if test "$jpeg_loader" != no ; then
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no,
|
||||
)
|
||||
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, jpeg_ok=yes, jpeg_ok=no)
|
||||
if test "$jpeg_ok" = yes; then
|
||||
AC_MSG_CHECKING([for jpeglib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <jpeglib.h>],
|
||||
jpeg_ok=yes,
|
||||
jpeg_ok=no)
|
||||
AC_MSG_RESULT($jpeg_ok)
|
||||
AC_CHECK_HEADER([jpeglib.h], , jpeg_ok=no)
|
||||
if test "$jpeg_ok" = yes; then
|
||||
JPEGLIBS="-ljpeg"
|
||||
fi
|
||||
|
@ -180,7 +151,6 @@ AM_CONDITIONAL(BUILD_JPEG_LOADER, test "$jpeg_ok" = yes)
|
|||
AC_SUBST(JPEGLIBS)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable png support)
|
||||
AC_ARG_WITH([png],
|
||||
[AS_HELP_STRING([--without-png], [Disable PNG image loader])],
|
||||
|
@ -207,7 +177,6 @@ fi
|
|||
AM_CONDITIONAL(BUILD_PNG_LOADER, test "$png_ok" = yes)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable tiff support)
|
||||
AC_ARG_WITH([tiff],
|
||||
[AS_HELP_STRING([--without-tiff], [Disable TIFF image loader])],
|
||||
|
@ -237,15 +206,7 @@ if test "$tiff_loader" != no ; then
|
|||
-ljpeg -lz -lm),
|
||||
)
|
||||
if test "$tiff_ok" = yes; then
|
||||
AC_MSG_CHECKING([for tiffio.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <tiffio.h>],
|
||||
tiff_ok=yes,
|
||||
tiff_ok=no)
|
||||
AC_MSG_RESULT($tiff_ok)
|
||||
AC_CHECK_HEADER([tiffio.h], , tiff_ok=no)
|
||||
if test "$tiff_ok" = yes; then
|
||||
TIFFLIBS=$tiff_libs
|
||||
fi
|
||||
|
@ -264,7 +225,6 @@ AM_CONDITIONAL(BUILD_TIFF_LOADER, test "$tiff_ok" = yes)
|
|||
AC_SUBST(TIFFLIBS)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable gif support)
|
||||
gif_lib=any
|
||||
AC_ARG_WITH([gif],
|
||||
|
@ -289,21 +249,9 @@ if test "$gif_loader" != no ; then
|
|||
AC_MSG_RESULT($gif_lib)
|
||||
|
||||
if test "$gif_lib" != libungif ; then
|
||||
AC_CHECK_LIB(gif, DGifOpenFileName,
|
||||
gif_libs="-lgif"
|
||||
gif_ok=yes,
|
||||
gif_ok=no,
|
||||
)
|
||||
AC_CHECK_LIB(gif, DGifOpenFileName, gif_libs="-lgif" gif_ok=yes, gif_ok=no)
|
||||
if test "$gif_ok" = yes; then
|
||||
AC_MSG_CHECKING([for gif_lib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <gif_lib.h>],
|
||||
gif_ok=yes,
|
||||
gif_ok=no)
|
||||
AC_MSG_RESULT($gif_ok)
|
||||
AC_CHECK_HEADER([gif_lib.h], , gif_ok=no)
|
||||
if test "$gif_ok" = yes; then
|
||||
GIFLIBS=$gif_libs
|
||||
gif_lib=giflib
|
||||
|
@ -312,21 +260,9 @@ if test "$gif_loader" != no ; then
|
|||
fi
|
||||
|
||||
if test "$gif_lib" != giflib ; then
|
||||
AC_CHECK_LIB(ungif, DGifOpenFileName,
|
||||
gif_libs="-lungif"
|
||||
gif_ok=yes,
|
||||
gif_ok=no,
|
||||
)
|
||||
AC_CHECK_LIB(ungif, DGifOpenFileName, gif_libs="-lungif" gif_ok=yes, gif_ok=no)
|
||||
if test "$gif_ok" = yes; then
|
||||
AC_MSG_CHECKING([for gif_lib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <gif_lib.h>],
|
||||
gif_ok=yes,
|
||||
gif_ok=no)
|
||||
AC_MSG_RESULT($gif_ok)
|
||||
AC_CHECK_HEADER([gif_lib.h], , gif_ok=no)
|
||||
if test "$gif_ok" = yes; then
|
||||
GIFLIBS=$gif_libs
|
||||
gif_lib=libungif
|
||||
|
@ -348,7 +284,6 @@ AM_CONDITIONAL(BUILD_GIF_LOADER, test "$gif_ok" = yes)
|
|||
AC_SUBST(GIFLIBS)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable zlib support)
|
||||
AC_ARG_WITH([zlib],
|
||||
[AS_HELP_STRING([--without-zlib], [Disable ZLIB loader])],
|
||||
|
@ -364,20 +299,9 @@ AC_ARG_WITH([zlib],
|
|||
AC_MSG_RESULT($zlib_loader)
|
||||
|
||||
if test "$zlib_loader" != no ; then
|
||||
AC_CHECK_LIB(z, uncompress,
|
||||
zlib_ok=yes,
|
||||
zlib_ok=no,
|
||||
)
|
||||
AC_CHECK_LIB(z, uncompress, zlib_ok=yes, zlib_ok=no)
|
||||
if test "$zlib_ok" = yes; then
|
||||
AC_MSG_CHECKING([for zlib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <zlib.h>],
|
||||
zlib_ok=yes,
|
||||
zlib_ok=no)
|
||||
AC_MSG_RESULT($zlib_ok)
|
||||
AC_CHECK_HEADER([zlib.h], , zlib_ok=no)
|
||||
if test "$zlib_ok" = yes; then
|
||||
ZLIBLIBS="-lz"
|
||||
fi
|
||||
|
@ -396,7 +320,6 @@ AM_CONDITIONAL(BUILD_ZLIB_LOADER, test "$zlib_ok" = yes)
|
|||
AC_SUBST(ZLIBLIBS)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable bzip2 support)
|
||||
AC_ARG_WITH([bzip2],
|
||||
[AS_HELP_STRING([--without-bzip2], [Disable BZIP2 loader])],
|
||||
|
@ -412,20 +335,9 @@ AC_ARG_WITH([bzip2],
|
|||
AC_MSG_RESULT($bz2_loader)
|
||||
|
||||
if test "$bz2_loader" != no ; then
|
||||
AC_CHECK_LIB(bz2, BZ2_bzRead,
|
||||
bz2_ok=yes,
|
||||
bz2_ok=no,
|
||||
)
|
||||
AC_CHECK_LIB(bz2, BZ2_bzRead, bz2_ok=yes, bz2_ok=no)
|
||||
if test "$bz2_ok" = yes; then
|
||||
AC_MSG_CHECKING([for bzlib.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <bzlib.h>],
|
||||
bz2_ok=yes,
|
||||
bz2_ok=no)
|
||||
AC_MSG_RESULT($bz2_ok)
|
||||
AC_CHECK_HEADER([bzlib.h], , bz2_ok=no)
|
||||
if test "$bz2_ok" = yes; then
|
||||
BZ2LIBS="-lbz2"
|
||||
fi
|
||||
|
@ -444,7 +356,6 @@ AM_CONDITIONAL(BUILD_BZ2_LOADER, test "$bz2_ok" = yes)
|
|||
AC_SUBST(BZ2LIBS)
|
||||
|
||||
|
||||
|
||||
AC_MSG_CHECKING(whether to enable id3 support)
|
||||
AC_ARG_WITH([id3],
|
||||
[AS_HELP_STRING([--without-id3], [Disable ID3 loader])],
|
||||
|
@ -466,15 +377,7 @@ if test "$id3_loader" != no ; then
|
|||
id3_ok=no,
|
||||
-lz)
|
||||
if test "$id3_ok" = yes; then
|
||||
AC_MSG_CHECKING([for id3tag.h])
|
||||
AC_TRY_CPP(
|
||||
[#include <stdio.h>
|
||||
#undef PACKAGE
|
||||
#undef VERSION
|
||||
#include <id3tag.h>],
|
||||
id3_ok=yes,
|
||||
id3_ok=no)
|
||||
AC_MSG_RESULT($id3_ok)
|
||||
AC_CHECK_HEADER([id3tag.h], , id3_ok=no)
|
||||
if test "$id3_ok" = yes; then
|
||||
ID3LIBS=$id3_libs
|
||||
fi
|
||||
|
@ -492,6 +395,7 @@ fi
|
|||
AM_CONDITIONAL(BUILD_ID3_LOADER, test "$id3_ok" = yes)
|
||||
AC_SUBST(ID3LIBS)
|
||||
|
||||
|
||||
AC_C_WARNFLAGS()
|
||||
|
||||
if test "x$enable_visibility_hiding" = xyes ; then
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I../lib \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||
@my_includes@
|
||||
-I$(top_builddir)/src/lib \
|
||||
$(X_CFLAGS)
|
||||
|
||||
if BUILD_X11
|
||||
X_BASED_PROGS = imlib2_show imlib2_test imlib2_bumpmap imlib2_poly imlib2_colorspace imlib2_view imlib2_grab
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
AM_CFLAGS = $(CWARNFLAGS)
|
||||
AM_CPPFLAGS = @my_includes@ -I. -I$(top_srcdir) -I$(top_builddir) -DPACKAGE_LIB_DIR=\"$(libdir)\"
|
||||
AM_CPPFLAGS = -DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||
-I$(top_builddir) \
|
||||
$(X_CFLAGS) \
|
||||
$(FREETYPE_CFLAGS)
|
||||
|
||||
# Older automakes (<1.10) do not use INCLUDES when compiling .S files
|
||||
AM_CCASFLAGS = -I$(top_builddir)
|
||||
|
||||
|
@ -82,17 +86,19 @@ AMD64_OBJS = $(AMD64_SRCS:.S=.lo)
|
|||
|
||||
EXTRA_DIST = $(MMX_SRCS) $(AMD64_SRCS) asm_loadimmq.S
|
||||
|
||||
MY_LIBS = -lXext -lX11 $(FREETYPE_LIBS) $(DLOPEN_LIBS) -lm
|
||||
|
||||
if BUILD_MMX
|
||||
libImlib2_la_LIBADD = $(MMX_OBJS) @my_libs@
|
||||
libImlib2_la_LIBADD = $(MMX_OBJS) $(MY_LIBS)
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(MMX_OBJS)
|
||||
EXTRA_libImlib2_la_SOURCES = $(MMX_SRCS)
|
||||
else
|
||||
if BUILD_AMD64
|
||||
libImlib2_la_LIBADD = $(AMD64_OBJS) @my_libs@
|
||||
libImlib2_la_LIBADD = $(AMD64_OBJS) $(MY_LIBS)
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h $(AMD64_OBJS)
|
||||
EXTRA_libImlib2_la_SOURCES = $(AMD64_SRCS)
|
||||
else
|
||||
libImlib2_la_LIBADD = @my_libs@
|
||||
libImlib2_la_LIBADD = $(MY_LIBS)
|
||||
libImlib2_la_DEPENDENCIES = $(top_builddir)/config.h
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
AM_CFLAGS = $(CWARNFLAGS)
|
||||
AM_CPPFLAGS = -I. \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/modules/filters \
|
||||
@my_includes@
|
||||
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/lib
|
||||
|
||||
pkgdir = $(libdir)/imlib2/filters
|
||||
pkg_LTLIBRARIES = testfilter.la bumpmap.la colormod.la
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
||||
|
||||
AM_CFLAGS = $(CWARNFLAGS)
|
||||
AM_CPPFLAGS = -I. \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/modules/loaders \
|
||||
@my_includes@
|
||||
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/lib
|
||||
|
||||
pkgdir = $(libdir)/imlib2/loaders
|
||||
|
||||
|
|
Loading…
Reference in New Issue