2000-07-30 13:21:14 -07:00
|
|
|
AC_INIT(src/Evas.h)
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
AM_INIT_AUTOMAKE(evas, 0.0.1)
|
2000-08-14 09:43:52 -07:00
|
|
|
AC_C_BIGENDIAN
|
2000-07-30 13:21:14 -07:00
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_STDC
|
2000-08-10 03:14:55 -07:00
|
|
|
AM_WITH_DMALLOC
|
2000-07-30 13:21:14 -07:00
|
|
|
AC_C_CONST
|
|
|
|
AM_ENABLE_SHARED
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
if test X"$enable_shared" = Xyes; then
|
|
|
|
DLLDFLAGS=-export-dynamic
|
|
|
|
AC_SUBST(DLLDFLAGS)
|
|
|
|
fi
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
2000-08-03 16:54:32 -07:00
|
|
|
|
2000-09-26 12:16:48 -07:00
|
|
|
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"
|
|
|
|
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"
|
|
|
|
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"
|
|
|
|
LIBS_GL="-L"$withval"/lib"])
|
|
|
|
|
2000-08-03 16:54:32 -07:00
|
|
|
#### Find out about X
|
|
|
|
AC_PATH_X
|
|
|
|
AC_PATH_XTRA
|
|
|
|
|
|
|
|
if test "x$x_includes" = "x"; then
|
|
|
|
x_includes="/usr/include"
|
|
|
|
fi
|
|
|
|
|
|
|
|
x_cflags="$X_CFLAGS"
|
|
|
|
x_ldflags="$X_LDFLAGS"
|
|
|
|
x_libs="$X_LIBS $X_EXTRA_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)
|
|
|
|
|
|
|
|
#### Find out about E db
|
2000-08-13 15:57:22 -07:00
|
|
|
#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)
|
|
|
|
#)
|
2000-08-03 16:54:32 -07:00
|
|
|
|
|
|
|
#### Find out about Imlib2
|
|
|
|
AC_CHECK_HEADER(Imlib2.h,
|
|
|
|
AC_CHECK_LIB(Imlib2, imlib_context_set_image, ,[
|
2000-07-30 13:21:14 -07:00
|
|
|
echo ""
|
|
|
|
echo "ERROR: Imlib 2 needed"
|
|
|
|
echo ""
|
2000-09-26 12:16:48 -07:00
|
|
|
AC_MSG_ERROR([Fatal Error: no Imlib2 detected.]); exit],
|
|
|
|
`$IMLIB2_CONFIG --libs` `$IMLIB2_CONFIG --cflags`)
|
2000-08-03 16:54:32 -07:00
|
|
|
)
|
|
|
|
|
2000-09-26 12:16:48 -07:00
|
|
|
AC_CHECK_LIB(ttf, TT_Init_FreeType, TTF_LIBS=-lttf $LIBS_TTF, [
|
2000-08-06 14:19:37 -07:00
|
|
|
echo ""
|
2000-08-20 00:13:31 -07:00
|
|
|
echo "ERROR: Evas needs a system with libttf.so (TrueType Font Library)"
|
2000-08-06 14:19:37 -07:00
|
|
|
echo "You can obtain it from:"
|
|
|
|
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
|
|
|
echo "You can also obtain it from:"
|
|
|
|
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 ""
|
2000-09-26 12:16:48 -07:00
|
|
|
AC_MSG_ERROR([Fatal Error: no FreeType detected.])], $LIBS_TTF -lm)
|
2000-08-06 14:19:37 -07:00
|
|
|
|
|
|
|
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 ""
|
|
|
|
echo "ERROR: freetype.h not found in freetype.h or freetype/freetype.h include"
|
|
|
|
echo "paths. (ie /usr/include, /usr/local/include etc.). You need the freetype"
|
2000-08-20 00:13:31 -07:00
|
|
|
echo "header files to build Evas. This may mean you have to install the"
|
2000-08-06 14:19:37 -07:00
|
|
|
echo "freetype-devel packages for your distribution or if all else fails"
|
2000-08-20 00:13:31 -07:00
|
|
|
echo "find the source for freetype and install that somewhere where Evas"
|
2000-08-06 14:19:37 -07:00
|
|
|
echo "can find the header files."
|
|
|
|
echo ""
|
|
|
|
echo "You can obtain it from:"
|
|
|
|
echo "ftp://ftp.enlightenment.org/pub/enlightenment/"
|
|
|
|
echo "You can also obtain it from:"
|
|
|
|
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 header files detected.])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-09-26 12:16:48 -07:00
|
|
|
ttf_includes="$CPPFLAGS"
|
|
|
|
ttf_libs="$LIBS_TTF -lm -lttf"
|
2000-08-06 14:19:37 -07:00
|
|
|
|
2000-08-03 16:54:32 -07:00
|
|
|
gl_includes=""
|
|
|
|
#### Find out about OpenGL
|
2000-08-14 14:49:03 -07:00
|
|
|
PREV_CPPFLAGS=$CPPFLAGS
|
|
|
|
CPPFLAGS=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
|
|
|
AC_TRY_CPP(GL/gl.h,
|
|
|
|
echo "checking for GL/gl.h... yes"
|
2000-09-26 12:16:48 -07:00
|
|
|
gl_includes=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
2000-08-14 14:49:03 -07:00
|
|
|
AC_CHECK_LIB(GL, glBindTexture, have_gl=yes,[
|
2000-09-26 12:16:48 -07:00
|
|
|
], -L/usr/local/lib -lGL $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS $LIBS_GL)
|
2000-08-03 16:54:32 -07:00
|
|
|
)
|
2000-08-14 14:49:03 -07:00
|
|
|
if test "x$have_gl" = "xyes"; then
|
2000-09-26 12:16:48 -07:00
|
|
|
gl_includes=$gl_includes
|
|
|
|
gl_ldflags=$gl_ldflags" -L/usr/local/lib "$X_LDFLAGS" "$X_EXTRA_LIBS" "$X_LIBS" "$LIBS_GL
|
2000-08-21 21:26:18 -07:00
|
|
|
gl_libs=$gl_libs" -lGL"
|
2000-08-14 14:49:03 -07:00
|
|
|
AC_DEFINE(HAVE_GL)
|
|
|
|
AC_TRY_CPP(GL/glu.h,
|
|
|
|
echo "checking for GL/glu.h... yes"
|
|
|
|
AC_CHECK_LIB(GLU, gluBuild2DMipmaps, have_glu=yes,[
|
2000-09-26 12:16:48 -07:00
|
|
|
], $gl_ldflags -lGL -lGLU)
|
2000-08-14 14:49:03 -07:00
|
|
|
)
|
|
|
|
if test "x$have_glu" = "xyes"; then
|
2000-08-21 21:26:18 -07:00
|
|
|
gl_includes=$gl_includes" -I/usr/include -I/usr/local/include"
|
|
|
|
gl_libs=$gl_libs" -lGLU"
|
2000-08-14 14:49:03 -07:00
|
|
|
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
|
|
|
|
echo "WARNING:......."
|
|
|
|
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
|
|
|
echo "built into Evas. This means much slower rendering perfromance."
|
|
|
|
echo "Please read the config.log file for more information as to why this library"
|
|
|
|
echo "was not found."
|
|
|
|
fi
|
|
|
|
CPPFLAGS=$PREV_CPPFLAGS
|
2000-08-12 23:31:54 -07:00
|
|
|
|
2000-09-26 12:16:48 -07:00
|
|
|
imlib2_inlcudes=`$IMLIB2_CONFIG --cflags`
|
|
|
|
imlib2_libs=`$IMLIB2_CONFIG --libs`
|
2000-08-21 21:26:18 -07:00
|
|
|
|
|
|
|
AC_SUBST(x_cflags)
|
|
|
|
AC_SUBST(x_includes)
|
|
|
|
AC_SUBST(x_ldflags)
|
|
|
|
AC_SUBST(x_libs)
|
2000-08-03 16:54:32 -07:00
|
|
|
AC_SUBST(gl_includes)
|
2000-08-21 21:26:18 -07:00
|
|
|
AC_SUBST(gl_ldflags)
|
|
|
|
AC_SUBST(gl_libs)
|
|
|
|
AC_SUBST(imlib2_includes)
|
|
|
|
AC_SUBST(imlib2_libs)
|
2000-09-26 12:16:48 -07:00
|
|
|
AC_SUBST(ttf_includes)
|
|
|
|
AC_SUBST(ttf_libs)
|
2000-08-03 16:54:32 -07:00
|
|
|
|
2000-08-21 21:26:18 -07:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile src/Makefile test/Makefile evas-config
|
|
|
|
], [
|
|
|
|
chmod +x evas-config
|
|
|
|
])
|