evas now uses pkg-config to detect EET. i also reworked the autoconf code for that, IMO it now is MUCH cleaner and easier to read than before. if this causes any trouble, please contact me rather than putting weird code in again. thanks :)

SVN revision: 28838
This commit is contained in:
tilman 2007-03-21 02:15:30 +00:00 committed by tilman
parent 4943fbb859
commit 99060c539f
8 changed files with 54 additions and 75 deletions

View File

@ -771,71 +771,55 @@ AM_CONDITIONAL(BUILD_SAVER_JPEG, test x$have_jpeg_saver = xyes)
####################################### #######################################
## EET ## EET
AC_ARG_WITH(eet-config, [ --with-eet-config=EET_CONFIG use eet-config specified], #
[ EET_CONFIG=$withval; # first, check whether the user WANTS to use EET
echo "using "$EET_CONFIG" for eet-config"; ], AC_ARG_ENABLE(image-loader-eet,
[ if test -z "$EET_CONFIG"; then AC_HELP_STRING(
AC_PATH_PROG(EET_CONFIG, "eet-config", "", $PATH) [--enable-image-loader-eet],
fi [enable EET image loader. [[default=enabled]]]
]) ),
if test -z "$EET_CONFIG" ; then EET_CONFIG="eet-config"; fi [want_eet_image_loader=$enableval],
eet_cflags=`$EET_CONFIG --cflags` [want_eet_image_loader=yes]
eet_libs=`$EET_CONFIG --libs` )
eet_version=`$EET_CONFIG --version`
have_eet="no"; AC_ARG_ENABLE(font-loader-eet,
have_eet_fonts="no"; AC_HELP_STRING(
if test -n "$eet_version" ; then [--enable-font-loader-eet],
eet_ok="yes"; [enable EET font loader. [[default=enabled]]]
have_eet="yes"; ),
have_eet_fonts="yes"; [want_eet_font_loader=$enableval],
[want_eet_font_loader=yes]
)
# next, if she does, check whether EET is available
if test "$want_eet_image_loader" = yes -o "$want_eet_font_loader" = yes; then
PKG_CHECK_MODULES(EET, eet, have_eet=yes, have_eet=no)
else
have_eet=no
fi fi
# finally, spew out the result
AC_MSG_CHECKING(whether to enable eet font loader)
if test "$want_eet_font_loader" = yes -a "$have_eet" = yes; then
AC_DEFINE(BUILD_FONT_LOADER_EET, 1, [EET Font Loader Support])
have_eet_font_loader=yes
requirements="$requirements eet"
else
have_eet_font_loader=no
fi
AC_MSG_RESULT($have_eet_font_loader)
AC_MSG_CHECKING(whether to enable eet image loader) AC_MSG_CHECKING(whether to enable eet image loader)
AC_ARG_ENABLE(image-loader-eet, if test "$want_eet_image_loader" = yes -a "$have_eet" = yes; then
[ --enable-image-loader-eet enable EET image loader], [ AC_DEFINE(BUILD_LOADER_EET, 1, [EET Image Loader Support])
if test x"$enableval" = x"yes" ; then have_eet_image_loader=yes
AC_MSG_RESULT(yes) requirements="$requirements eet"
have_eet="yes"
else
AC_MSG_RESULT(no)
have_eet="no"
eet_cflags=""
eet_libs=""
fi
], [
AC_MSG_RESULT($have_eet)
]
)
AC_MSG_CHECKING(whether to enable eet font loader)
AC_ARG_ENABLE(font-loader-eet,
[ --enable-font-loader-eet enable EET font loader], [
if test x"$enableval" = x"yes" ; then
AC_MSG_RESULT(yes)
have_eet_fonts="yes"
else
AC_MSG_RESULT(no)
have_eet_fonts="no"
fi
], [
AC_MSG_RESULT($have_eet_fonts)
]
)
AC_MSG_CHECKING(whether to enable eet support)
if test "x$eet_ok" = "xyes"; then
AC_MSG_RESULT(yes)
if test "x$have_eet" = "xyes"; then
AC_DEFINE(BUILD_LOADER_EET, 1, [EET Image Loader Support])
fi
if test "x$have_eet_fonts" = "xyes"; then
AC_DEFINE(BUILD_FONT_LOADER_EET, 1, [EET Font Loader Support])
fi
else else
AC_MSG_RESULT(no) have_eet_image_loader=no
fi fi
AC_MSG_RESULT($have_eet_image_loader)
AM_CONDITIONAL(BUILD_LOADER_EET, test x$have_eet = xyes) AM_CONDITIONAL(BUILD_LOADER_EET, test $have_eet_image_loader = yes)
####################################### #######################################
## EDB ## EDB
@ -1954,8 +1938,6 @@ AC_SUBST(png_cflags)
AC_SUBST(png_libs) AC_SUBST(png_libs)
AC_SUBST(jpeg_cflags) AC_SUBST(jpeg_cflags)
AC_SUBST(jpeg_libs) AC_SUBST(jpeg_libs)
AC_SUBST(eet_cflags)
AC_SUBST(eet_libs)
AC_SUBST(edb_cflags) AC_SUBST(edb_cflags)
AC_SUBST(edb_libs) AC_SUBST(edb_libs)
AC_SUBST(tiff_cflags) AC_SUBST(tiff_cflags)
@ -1967,9 +1949,6 @@ AC_SUBST(svg_libs)
# Build the list of required libs for evas.pc.in. Only works for libs # Build the list of required libs for evas.pc.in. Only works for libs
# which install a .pc file of course # which install a .pc file of course
if test "x$eet_libs" != "x"; then
requirements="$requirements eet"
fi
if test "x$edb_libs" != "x"; then if test "x$edb_libs" != "x"; then
requirements="$requirements edb" requirements="$requirements edb"
fi fi
@ -2075,7 +2054,7 @@ echo "Image Loaders:"
echo " GIF.....................: $have_gif" echo " GIF.....................: $have_gif"
echo " PNG.....................: $have_png" echo " PNG.....................: $have_png"
echo " JPEG....................: $have_jpeg" echo " JPEG....................: $have_jpeg"
echo " EET.....................: $have_eet" echo " EET.....................: $have_eet_image_loader"
echo " EDB.....................: $have_edb" echo " EDB.....................: $have_edb"
echo " TIFF....................: $have_tiff" echo " TIFF....................: $have_tiff"
echo " XPM.....................: $have_xpm" echo " XPM.....................: $have_xpm"
@ -2084,7 +2063,7 @@ echo " SVG.....................: $have_svg"
# FIXME: add more image loader modules # FIXME: add more image loader modules
echo echo
echo "Font Sourcing Systems:" echo "Font Sourcing Systems:"
echo " EET.....................: $have_eet_fonts" echo " EET.....................: $have_eet_font_loader"
echo echo
echo "Font Searching Systems:" echo "Font Searching Systems:"
echo " FontConfig..............: $have_fontconfig" echo " FontConfig..............: $have_fontconfig"

View File

@ -46,7 +46,7 @@ while test $# -gt 0; do
;; ;;
--libs) --libs)
libdirs=-L@libdir@ libdirs=-L@libdir@
echo $libdirs -levas @pthread_libs@ @dlopen_libs@ @eet_libs@ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ echo $libdirs -levas @pthread_libs@ @dlopen_libs@ @EET_LIBS@ @FREETYPE_LIBS@ @FONTCONFIG_LIBS@
;; ;;
*) *)
echo "${usage}" 1>&2 echo "${usage}" 1>&2

View File

@ -8,7 +8,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \ @FREETYPE_CFLAGS@ \
@eet_cflags@ \ @EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ \ @FONTCONFIG_CFLAGS@ \
@pthread_cflags@ @pthread_cflags@
@ -29,7 +29,7 @@ libevas_la_LIBADD = \
-lm \ -lm \
@dlopen_libs@ \ @dlopen_libs@ \
@FREETYPE_LIBS@ \ @FREETYPE_LIBS@ \
@eet_libs@ \ @EET_LIBS@ \
@FONTCONFIG_LIBS@ \ @FONTCONFIG_LIBS@ \
@pthread_libs@ @pthread_libs@

View File

@ -8,7 +8,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. \ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @eet_cflags@ \ @FREETYPE_CFLAGS@ @EET_CFLAGS@ \
@FONTCONFIG_CFLAGS@ @FONTCONFIG_CFLAGS@
noinst_LTLIBRARIES = libevas_canvas.la noinst_LTLIBRARIES = libevas_canvas.la

View File

@ -8,7 +8,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \ @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
@eet_cflags@ @pthread_cflags@ @EET_CFLAGS@ @pthread_cflags@
noinst_LTLIBRARIES = libevas_engine_common.la noinst_LTLIBRARIES = libevas_engine_common.la
libevas_engine_common_la_SOURCES = \ libevas_engine_common_la_SOURCES = \

View File

@ -9,7 +9,7 @@ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ \ @FREETYPE_CFLAGS@ \
@eet_cflags@ @EET_CFLAGS@
noinst_LTLIBRARIES = libevas_imaging.la noinst_LTLIBRARIES = libevas_imaging.la
libevas_imaging_la_SOURCES = \ libevas_imaging_la_SOURCES = \

View File

@ -8,7 +8,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. \ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @eet_cflags@ @FREETYPE_CFLAGS@ @EET_CFLAGS@
pkgdir = $(libdir)/evas/modules/loaders/eet/$(MODULE_ARCH) pkgdir = $(libdir)/evas/modules/loaders/eet/$(MODULE_ARCH)
@ -16,7 +16,7 @@ pkg_LTLIBRARIES = module.la
module_la_SOURCES = evas_image_load_eet.c module_la_SOURCES = evas_image_load_eet.c
module_la_LIBADD = @eet_libs@ $(top_builddir)/src/lib/libevas.la module_la_LIBADD = @EET_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
module_la_DEPENDENCIES = $(top_builddir)/config.h module_la_DEPENDENCIES = $(top_builddir)/config.h

View File

@ -8,7 +8,7 @@ MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I. \ INCLUDES = -I. \
-I$(top_srcdir)/src/lib \ -I$(top_srcdir)/src/lib \
-I$(top_srcdir)/src/lib/include \ -I$(top_srcdir)/src/lib/include \
@FREETYPE_CFLAGS@ @eet_cflags@ @FREETYPE_CFLAGS@ @EET_CFLAGS@
pkgdir = $(libdir)/evas/modules/savers/eet/$(MODULE_ARCH) pkgdir = $(libdir)/evas/modules/savers/eet/$(MODULE_ARCH)
@ -16,7 +16,7 @@ pkg_LTLIBRARIES = module.la
module_la_SOURCES = evas_image_save_eet.c module_la_SOURCES = evas_image_save_eet.c
module_la_LIBADD = @eet_libs@ $(top_builddir)/src/lib/libevas.la module_la_LIBADD = @EET_LIBS@ $(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs module_la_LDFLAGS = @create_shared_lib@ -module -avoid-version -L$(top_builddir)/src/lib -L$(top_builddir)/src/lib/.libs
module_la_DEPENDENCIES = $(top_builddir)/config.h module_la_DEPENDENCIES = $(top_builddir)/config.h