- Fix warnings

- Actually check for dependency libs


SVN revision: 8433
This commit is contained in:
xcomputerman 2004-01-15 00:12:19 +00:00 committed by xcomputerman
parent c53a08409a
commit 984869d881
6 changed files with 223 additions and 10 deletions

0
legacy/edje/ChangeLog Normal file
View File

0
legacy/edje/NEWS Normal file
View File

151
legacy/edje/acinclude.m4 Normal file
View File

@ -0,0 +1,151 @@
dnl AC_EXPAND_DIR(VARNAME, DIR)
dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
dnl and assigns the resulting string to VARNAME
dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
AC_DEFUN(AC_EXPAND_DIR, [
$1=$2
$1=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""[$]$1"\"
)`
])
dnl @synopsis AC_PATH_GENERIC(LIBRARY [, MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl
dnl Runs a LIBRARY-config script and defines LIBRARY_CFLAGS and LIBRARY_LIBS
dnl
dnl The script must support `--cflags' and `--libs' args.
dnl If MINIMUM-VERSION is specified, the script must also support the
dnl `--version' arg.
dnl If the `--with-library-[exec-]prefix' arguments to ./configure are given,
dnl it must also support `--prefix' and `--exec-prefix'.
dnl (In other words, it must be like gtk-config.)
dnl
dnl For example:
dnl
dnl AC_PATH_GENERIC(Foo, 1.0.0)
dnl
dnl would run `foo-config --version' and check that it is at least 1.0.0
dnl
dnl If so, the following would then be defined:
dnl
dnl FOO_CFLAGS to `foo-config --cflags`
dnl FOO_LIBS to `foo-config --libs`
dnl
dnl At present there is no support for additional "MODULES" (see AM_PATH_GTK)
dnl (shamelessly stolen from gtk.m4 and then hacked around a fair amount)
dnl
dnl @author Angus Lees <gusl@cse.unsw.edu.au>
dnl @version $Id$
AC_DEFUN(AC_PATH_GENERIC,
[dnl
dnl we're going to need uppercase, lowercase and user-friendly versions of the
dnl string `LIBRARY'
pushdef([UP], translit([$1], [a-z], [A-Z]))dnl
pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
dnl
dnl Get the cflags and libraries from the LIBRARY-config script
dnl
AC_ARG_WITH(DOWN-prefix,[ --with-]DOWN[-prefix=PFX Prefix where $1 is installed (optional)],
DOWN[]_config_prefix="$withval", DOWN[]_config_prefix="")
AC_ARG_WITH(DOWN-exec-prefix,[ --with-]DOWN[-exec-prefix=PFX Exec prefix where $1 is installed (optional)],
DOWN[]_config_exec_prefix="$withval", DOWN[]_config_exec_prefix="")
if test x$DOWN[]_config_exec_prefix != x ; then
DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
if test x${UP[]_CONFIG+set} != xset ; then
UP[]_CONFIG=$DOWN[]_config_exec_prefix/bin/DOWN-config
fi
fi
if test x$DOWN[]_config_prefix != x ; then
DOWN[]_config_args="$DOWN[]_config_args --prefix=$DOWN[]_config_prefix"
if test x${UP[]_CONFIG+set} != xset ; then
UP[]_CONFIG=$DOWN[]_config_prefix/bin/DOWN-config
fi
fi
AC_PATH_PROG(UP[]_CONFIG, DOWN-config, no)
ifelse([$2], ,
AC_MSG_CHECKING(for $1),
AC_MSG_CHECKING(for $1 - version >= $2)
)
no_[]DOWN=""
if test "$UP[]_CONFIG" = "no" ; then
no_[]DOWN=yes
else
UP[]_CFLAGS="`$UP[]_CONFIG $DOWN[]_config_args --cflags`"
UP[]_LIBS="`$UP[]_CONFIG $DOWN[]_config_args --libs`"
ifelse([$2], , ,[
DOWN[]_config_major_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
DOWN[]_config_minor_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
DOWN[]_config_micro_version=`$UP[]_CONFIG $DOWN[]_config_args \
--version | sed 's/[[^0-9]]*\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
DOWN[]_wanted_major_version="regexp($2, [\<\([0-9]*\)], [\1])"
DOWN[]_wanted_minor_version="regexp($2, [\<\([0-9]*\)\.\([0-9]*\)], [\2])"
DOWN[]_wanted_micro_version="regexp($2, [\<\([0-9]*\).\([0-9]*\).\([0-9]*\)], [\3])"
# Compare wanted version to what config script returned.
# If I knew what library was being run, i'd probably also compile
# a test program at this point (which also extracted and tested
# the version in some library-specific way)
if test "$DOWN[]_config_major_version" -lt \
"$DOWN[]_wanted_major_version" \
-o \( "$DOWN[]_config_major_version" -eq \
"$DOWN[]_wanted_major_version" \
-a "$DOWN[]_config_minor_version" -lt \
"$DOWN[]_wanted_minor_version" \) \
-o \( "$DOWN[]_config_major_version" -eq \
"$DOWN[]_wanted_major_version" \
-a "$DOWN[]_config_minor_version" -eq \
"$DOWN[]_wanted_minor_version" \
-a "$DOWN[]_config_micro_version" -lt \
"$DOWN[]_wanted_micro_version" \) ; then
# older version found
no_[]DOWN=yes
echo -n "*** An old version of $1 "
echo -n "($DOWN[]_config_major_version"
echo -n ".$DOWN[]_config_minor_version"
echo ".$DOWN[]_config_micro_version) was found."
echo -n "*** You need a version of $1 newer than "
echo -n "$DOWN[]_wanted_major_version"
echo -n ".$DOWN[]_wanted_minor_version"
echo ".$DOWN[]_wanted_micro_version."
echo "***"
echo "*** If you have already installed a sufficiently new version, this error"
echo "*** probably means that the wrong copy of the DOWN-config shell script is"
echo "*** being found. The easiest way to fix this is to remove the old version"
echo "*** of $1, but you can also set the UP[]_CONFIG environment to point to the"
echo "*** correct copy of DOWN-config. (In this case, you will have to"
echo "*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf"
echo "*** so that the correct libraries are found at run-time)"
fi
])
fi
if test "x$no_[]DOWN" = x ; then
AC_MSG_RESULT(yes)
ifelse([$3], , :, [$3])
else
AC_MSG_RESULT(no)
if test "$UP[]_CONFIG" = "no" ; then
echo "*** The DOWN-config script installed by $1 could not be found"
echo "*** If $1 was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the UP[]_CONFIG environment variable to the"
echo "*** full path to DOWN-config."
fi
UP[]_CFLAGS=""
UP[]_LIBS=""
ifelse([$4], , :, [$4])
fi
AC_SUBST(UP[]_CFLAGS)
AC_SUBST(UP[]_LIBS)
popdef([UP])
popdef([DOWN])
])

View File

@ -80,16 +80,74 @@ dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])
my_includes=`eet-config --cflags`" "`evas-config --cflags`" "`ecore-config --cflags`
my_libs=`eet-config --libs`" "`evas-config --libs`" "`ecore-config --libs`
AC_SUBST(my_includes)
AC_SUBST(my_libs)
AC_ARG_WITH(eet,
[ --with-eet=DIR use eet in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
imlib2_includes=`imlib2-config --cflags`
AC_PATH_GENERIC(eet, , [
AC_SUBST(eet_libs)
AC_SUBST(eet_cflags)],
AC_MSG_ERROR(Cannot find eet: Is eet-config in path?))
eet_libs=`eet-config --libs`
eet_cflags=`eet-config --cflags`
AC_SUBST(eet_cflags)
AC_SUBST(eet_libs)
AC_ARG_WITH(imlib2,
[ --with-imlib2=DIR use imlib2 in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
AC_PATH_GENERIC(imlib2, , [
AC_SUBST(imlib2_libs)
AC_SUBST(imlib2_cflags)],
AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in path?))
imlib2_libs=`imlib2-config --libs`
AC_SUBST(imlib2_includes)
imlib2_cflags=`imlib2-config --cflags`
AC_SUBST(imlib2_cflags)
AC_SUBST(imlib2_libs)
AC_ARG_WITH(evas,
[ --with-evas=DIR use evas in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
AC_PATH_GENERIC(evas, , [
AC_SUBST(evas_libs)
AC_SUBST(evas_cflags)],
AC_MSG_ERROR(Cannot find evas: Is evas-config in path?))
evas_libs=`evas-config --libs`
evas_cflags=`evas-config --cflags`
AC_SUBST(evas_cflags)
AC_SUBST(evas_libs)
AC_CHECK_HEADERS(Evas_Engine_Software_X11.h, [], [], [
#include <Evas.h>
])
AC_CHECK_HEADERS(Evas_Engine_GL_X11.h, [], [], [
#include <Evas.h>
])
AC_ARG_WITH(ecore,
[ --with-ecore=DIR use ecore in <DIR>],
[CFLAGS="$CFLAGS -I$withval/include"
LIBS="-L$withval/lib $LIBS"])
AC_PATH_GENERIC(ecore, , [
AC_SUBST(ecore_libs)
AC_SUBST(ecore_cflags)],
AC_MSG_ERROR(Cannot find ecore: Is ecore-config in path?))
ecore_libs=`ecore-config --libs`
ecore_cflags=`ecore-config --cflags`
AC_SUBST(ecore_cflags)
AC_SUBST(ecore_libs)
AC_OUTPUT([
Makefile
src/Makefile

View File

@ -9,8 +9,10 @@ INCLUDES = \
-I$(top_srcdir)/lib \
-I$(top_builddir)/lib \
-I/usr/local/include \
@my_includes@ \
@imlib2_includes@
@eet_cflags@ \
@evas_cflags@ \
@ecore_cflags@ \
@imlib2_cflags@
bin_PROGRAMS = edje edje_cc edje_ls

View File

@ -11,7 +11,9 @@ INCLUDES = \
-I$(top_srcdir) \
-I$(top_builddir) \
-I$(includedir) \
@my_includes@
@eet_cflags@ \
@evas_cflags@ \
@ecore_cflags@
lib_LTLIBRARIES = libedje.la
include_HEADERS = Edje.h
@ -27,6 +29,6 @@ edje_text.c \
edje_util.c \
edje_private.h
libedje_la_LIBADD = $(LDFLAGS) -lm @my_libs@
libedje_la_LIBADD = $(LDFLAGS) -lm @evas_libs@ @ecore_libs@ @eet_libs@
libedje_la_DEPENDENCIES = $(top_builddir)/config.h
libedje_la_LDFLAGS = -version-info 0:1:0