forked from enlightenment/efl
now just be cleaning things a bit i got rid of that rogue -lImlib2. i disabled
the actual configure checks for imlib2 as the script shoudl contain all the stuff needed - all it needs to do is chekc the imlib2-config script is alive and around. thats all. SVN revision: 4978
This commit is contained in:
parent
635f97999a
commit
54d32f99c7
|
@ -1,34 +1,48 @@
|
|||
# SETUP
|
||||
AC_INIT(src/Evas.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(evas, 0.5.0)
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AM_WITH_DMALLOC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
|
||||
IMLIB2_CONFIG_IN_PATH=xyes
|
||||
AC_PROGRAM_CHECK(IMLIB2_CONFIG_IN_PATH, imlib2-config, xyes, xno)
|
||||
if test $IMLIB2_CONFIG_IN_PATH = xno; then
|
||||
echo "ERROR:"
|
||||
echo "The imlib2-config development script was not found in your execute"
|
||||
echo "path. This may mean one of several things"
|
||||
echo "1. You may not have installed the Imlib2-devel (or Imlib2-dev)"
|
||||
echo " packages."
|
||||
echo "2. You may have Imlib2 installed somewhere not covered by your path."
|
||||
echo ""
|
||||
echo "If this is the case make sure you have the packages installed, AND"
|
||||
echo "that the imlib2-config script is in your execute path (see your"
|
||||
echo "shell's manual page on setting the \$PATH environment variable)."
|
||||
AC_MSG_ERROR([Fatal Error: no imlib2-config detected.])
|
||||
exit;
|
||||
fi
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
IMLIB2_CONFIG="imlib2-config"
|
||||
|
||||
AC_ARG_WITH(imlib2,
|
||||
[ --with-imlib2=DIR use DIR where imlib2 was installed (eg /usr/local)],
|
||||
[CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
IMLIB2_CONFIG=$withval"/bin/imlib2-config"])
|
||||
AC_ARG_WITH(ttf,
|
||||
[ --with-ttf=DIR use DIR where freetype was installed (eg /opt/freetype)],
|
||||
[CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
LIBS_TTF="-L"$withval"/lib"])
|
||||
[
|
||||
--with-ttf=DIR use DIR where freetype was installed (eg /opt/freetype)
|
||||
],
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_TTF="-L"$withval"/lib"
|
||||
])
|
||||
|
||||
AC_ARG_WITH(gl,
|
||||
[
|
||||
--with-gl=DIR use DIR where opengl was installed (eg /usr/X11R6)
|
||||
],
|
||||
[
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include";
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib";
|
||||
LIBS_GL="-L"$withval"/lib"
|
||||
])
|
||||
|
||||
gl=yes
|
||||
AC_ARG_ENABLE(gl,
|
||||
[ --disable-gl disable building with opengl support],
|
||||
[--disable-gl disable building with opengl support],
|
||||
[
|
||||
if test x$enableval = xyes; then
|
||||
gl=yes
|
||||
|
@ -38,13 +52,21 @@ AC_ARG_ENABLE(gl,
|
|||
]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(gl,
|
||||
[ --with-gl=DIR use DIR where opengl was installed (eg /usr/X11R6)],
|
||||
[CPPFLAGS="$CPPFLAGS -I$withval/include"; LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
LIBS_GL="-L"$withval"/lib"])
|
||||
AC_C_BIGENDIAN
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_STDC
|
||||
AM_WITH_DMALLOC
|
||||
AC_C_CONST
|
||||
AM_ENABLE_SHARED
|
||||
AM_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_MAKE_SET
|
||||
|
||||
if test X"$enable_shared" = Xyes; then
|
||||
DLLDFLAGS=-export-dynamic
|
||||
AC_SUBST(DLLDFLAGS)
|
||||
fi
|
||||
|
||||
#### Find out about X
|
||||
AC_PATH_X
|
||||
AC_PATH_XTRA
|
||||
|
||||
|
@ -56,48 +78,48 @@ x_cflags="$X_CFLAGS"
|
|||
x_ldflags="$X_LDFLAGS"
|
||||
x_libs="$X_LIBS $X_EXTRA_LIBS -lX11"
|
||||
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="$x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
AC_CHECK_LIB(Xext, XShmAttach, x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(XextSam, XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(Xext, XShapeCombineMask, x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(
|
||||
X11,
|
||||
XOpenDisplay,
|
||||
x_libs="$x_libs",
|
||||
AC_MSG_ERROR([ERROR: libX11 not found.]); exit,
|
||||
$X_LDFLAGS $X_EXTRA_LIBS $X_LIBS
|
||||
)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShmAttach,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_CHECK_LIB(
|
||||
XextSam,
|
||||
XShmAttach,
|
||||
x_libs="-lXextSam -lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShm not found.]); exit,
|
||||
$x_libs),
|
||||
$x_libs)
|
||||
AC_CHECK_LIB(
|
||||
Xext,
|
||||
XShapeCombineMask,
|
||||
x_libs="-lXext $x_libs",
|
||||
AC_MSG_ERROR([ERROR: XShape not found.]); exit,
|
||||
$x_libs)
|
||||
|
||||
x_libs="$x_libs -lX11"
|
||||
|
||||
#AC_CHECK_LIB(Xrender, XRenderCreatePicture,
|
||||
# [ x_libs=" -lXrender -lXext $x_libs";
|
||||
# AC_DEFINE(HAVE_RENDER)
|
||||
# ],
|
||||
# [],
|
||||
# $x_libs)
|
||||
#AC_CHECK_LIB(
|
||||
#Xrender,
|
||||
#XRenderCreatePicture,
|
||||
#[
|
||||
#x_libs=" -lXrender -lXext $x_libs";
|
||||
#AC_DEFINE(HAVE_RENDER)
|
||||
#],
|
||||
#[],
|
||||
#$x_libs)
|
||||
|
||||
#### Find out about E db
|
||||
#AC_CHECK_HEADER(Edb.h,
|
||||
#AC_CHECK_LIB(edb, e_db_open, ,[
|
||||
#echo ""
|
||||
#echo "ERROR: E db needed"
|
||||
#echo ""
|
||||
#AC_MSG_ERROR([Fatal Error: no E db detected.]); exit], -L/usr/local/lib -ldb)
|
||||
#)
|
||||
|
||||
#### Find out about Imlib2
|
||||
AC_CHECK_HEADER(Imlib2.h,
|
||||
AC_CHECK_LIB(Imlib2, imlib_context_set_image, ,[
|
||||
echo ""
|
||||
echo "ERROR: Imlib 2 needed"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no Imlib2 detected.]); exit],
|
||||
`$IMLIB2_CONFIG --libs` `$IMLIB2_CONFIG --cflags`)
|
||||
)
|
||||
|
||||
AC_CHECK_LIB(ttf, TT_Init_FreeType, TTF_LIBS="-lttf "$LIBS_TTF, [
|
||||
echo ""
|
||||
AC_CHECK_LIB(
|
||||
ttf,
|
||||
TT_Init_FreeType,
|
||||
TTF_LIBS="-lttf "$LIBS_TTF,
|
||||
[
|
||||
echo "ERROR: Evas needs a system with libttf.so (TrueType Font Library)"
|
||||
echo "You can obtain it from:"
|
||||
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
||||
|
@ -106,13 +128,13 @@ echo "http://www.freetype.org/"
|
|||
echo "You can obtain some truetype fonts from:"
|
||||
echo "http://voyager.cns.ohiou.edu/~sadkins/web_library/fonts/font_archive/"
|
||||
echo ""
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType detected.])], $LIBS_TTF -lm)
|
||||
|
||||
AC_CHECK_HEADERS(freetype.h freetype/freetype.h,[ break] , )
|
||||
AC_MSG_ERROR([Fatal Error: no FreeType detected.])
|
||||
],
|
||||
$LIBS_TTF -lm)
|
||||
|
||||
AC_CHECK_HEADERS(freetype.h freetype/freetype.h, [ break ], )
|
||||
AC_CHECK_HEADER(freetype.h, [ ftype=yes ], [ ftype=no ])
|
||||
AC_CHECK_HEADER(freetype/freetype.h, [ ftype_ftype=yes ], [ ftype_ftype=no ])
|
||||
|
||||
if test x$ftype = xno; then
|
||||
if test x$ftype_ftype = xno; then
|
||||
echo ""
|
||||
|
@ -139,48 +161,91 @@ ttf_libs="$LIBS_TTF -lm -lttf"
|
|||
|
||||
if test x$gl = xyes ; then
|
||||
gl_includes=""
|
||||
#### Find out about OpenGL
|
||||
PREV_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
||||
AC_TRY_CPP([#include <GL/gl.h>],
|
||||
echo "checking for GL/gl.h... yes"
|
||||
gl_includes=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
||||
AC_CHECK_LIB(GL, glBindTexture, have_gl=yes,[
|
||||
], -L/usr/local/lib -lGL $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS $LIBS_GL -lm)
|
||||
)
|
||||
if test "x$have_gl" = "xyes"; then
|
||||
gl_includes=$gl_includes
|
||||
gl_ldflags=$gl_ldflags" -L/usr/local/lib "$X_LDFLAGS" "$X_EXTRA_LIBS" "$X_LIBS" "$LIBS_GL
|
||||
gl_libs=$gl_libs" -lGL"
|
||||
AC_DEFINE(HAVE_GL)
|
||||
AC_TRY_CPP([#include <GL/glu.h>],
|
||||
echo "checking for GL/glu.h... yes"
|
||||
AC_CHECK_LIB(GLU, gluBuild2DMipmaps, have_glu=yes,[
|
||||
], $gl_ldflags -lGL -lGLU -lm)
|
||||
)
|
||||
AC_CHECK_LIB(GLU, gluTessBeginPolygon, ,[
|
||||
echo ""
|
||||
echo "ERROR: evas needs a system with libGLU 1.3"
|
||||
echo "You can obtain it from:"
|
||||
echo " http://www.mesa3d.org/downloads/sgi.html"
|
||||
echo "You will need to obtain the SGI'd libGLU."
|
||||
echo "debian: download the rpm and use alien to convert it"
|
||||
echo ""
|
||||
have_glu = no
|
||||
AC_MSG_ERROR([ERROR: libGLU 1.3 not found.])]; exit, $gl_ldflags -lGL -lGLU -lm)
|
||||
|
||||
if test "x$have_glu" = "xyes"; then
|
||||
gl_includes=$gl_includes" -I/usr/include -I/usr/local/include"
|
||||
gl_libs=$gl_libs" -lGLU"
|
||||
AC_DEFINE(HAVE_GLU)
|
||||
else
|
||||
echo "WARNING:......."
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down"
|
||||
echo "of images will be disabled."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
fi
|
||||
else
|
||||
header_gl_h=xno
|
||||
header_glu_h=xno
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/gl.h... yes";
|
||||
gl_includes=$CPPFLAGS;
|
||||
header_gl_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/gl.h... no";
|
||||
header_gl_h=xno;
|
||||
])
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_TRY_CPP(
|
||||
[
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
],
|
||||
[
|
||||
echo "checking for GL/glu.h... yes";
|
||||
glu_includes=$CPPFLAGS;
|
||||
header_glu_h=xyes;
|
||||
]
|
||||
,
|
||||
[
|
||||
echo "checking for GL/glu.h... no";
|
||||
header_glu_h=xno;
|
||||
])
|
||||
fi
|
||||
|
||||
have_gl=no
|
||||
have_glu=no
|
||||
|
||||
if test $header_gl_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GL,
|
||||
glBindTexture,
|
||||
have_gl=yes,
|
||||
[],
|
||||
-L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm)
|
||||
fi
|
||||
if test "x$have_gl" = "xyes"; then
|
||||
gl_includes=$gl_includes
|
||||
gl_ldflags="$gl_ldflags -L/usr/local/lib -lGL $x_libs $x_ldflags $x_cflags $LIBS_GL -lm";
|
||||
gl_libs=$gl_libs" -lGL"
|
||||
AC_DEFINE(HAVE_GL)
|
||||
fi
|
||||
|
||||
if test $header_glu_h = xyes; then
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluBuild2DMipmaps,
|
||||
have_glu=yes,
|
||||
echo "WARNING:.......";
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down";
|
||||
echo "of images will be disabled.";
|
||||
echo "Please read the config.log file for more information as to why this library";
|
||||
echo "was not found.";
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
AC_CHECK_LIB(
|
||||
GLU,
|
||||
gluTessBeginPolygon,
|
||||
have_glu=yes,
|
||||
echo "";
|
||||
echo "ERROR: evas needs a system with libGLU 1.3";
|
||||
echo "You can obtain it from:";
|
||||
echo "http://www.mesa3d.org/downloads/sgi.html";
|
||||
echo "You will need to obtain the SGI'd libGLU.";
|
||||
echo "debian: download the rpm and use alien to convert it";
|
||||
echo "";
|
||||
have_glu = no;
|
||||
,
|
||||
$gl_ldflags -lGL -lGLU)
|
||||
fi
|
||||
|
||||
if test have_gl = no; then
|
||||
echo "WARNING:......."
|
||||
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
||||
echo "built into Evas. Ifapplications request 3D Hardware rendering from"
|
||||
|
@ -192,8 +257,8 @@ fi
|
|||
fi
|
||||
CPPFLAGS=$PREV_CPPFLAGS
|
||||
|
||||
imlib2_includes=`$IMLIB2_CONFIG --cflags`
|
||||
imlib2_libs=`$IMLIB2_CONFIG --libs`
|
||||
imlib2_includes=`imlib2-config --cflags`
|
||||
imlib2_libs=`imlib2-config --libs`
|
||||
|
||||
AC_SUBST(x_cflags)
|
||||
AC_SUBST(x_includes)
|
||||
|
@ -208,7 +273,14 @@ AC_SUBST(ttf_includes)
|
|||
AC_SUBST(ttf_libs)
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile src/Makefile test/Makefile test/img/Makefile test/fnt/Makefile evas-config doc/Makefile debian/Makefile
|
||||
Makefile
|
||||
src/Makefile
|
||||
test/Makefile
|
||||
test/img/Makefile
|
||||
test/fnt/Makefile
|
||||
evas-config
|
||||
doc/Makefile
|
||||
debian/Makefile
|
||||
], [
|
||||
chmod +x evas-config
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue