dnl Top-level configure for VFlib verison 2 package dnl by H.Kakugawa (h.kakugawa@computer.org) AC_INIT(src/VF.h) AC_CONFIG_HEADER(src/config.h src/with.h) AC_REQUIRE([AC_STARTUP]) dnl configure libtool AM_DISABLE_STATIC AM_PROG_LIBTOOL dnl VFlib version vflib2_version='2.25.6' AC_SUBST(vflib2_version) dnl Libtool versioning scheme CUR=24 REV=4 AGE=0 AC_SUBST(version_info) version_info=$CUR:$REV:$AGE dnl From GNU Libtoool 1.2 manual: dnl 1. Start with version information of `0:0:0' for each libtool library. dnl dnl 2. Update the version information only immediately before a public dnl release of your software. More frequent updates are unnecessary, dnl and only guarantee that the current interface number gets larger dnl faster. dnl dnl 3. If the library source code has changed at all since the last dnl update, then increment REVISION (`C:R:A' becomes `C:R+1:A'). dnl dnl 4. If any interfaces have been added, removed, or changed since the dnl last update, increment CURRENT, and set REVISION to 0. dnl dnl 5. If any interfaces have been added since the last public release, dnl then increment AGE. dnl dnl 6. If any interfaces have been removed since the last public release, dnl then set AGE to 0. AC_PROG_CC AC_PROG_CPP AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_RANLIB if test "x$CC" = xgcc; then XX_CFLAGS="-Wall -ansi" else XX_CFLAGS= fi AC_SUBST(XX_CFLAGS) AC_SUBST(freetype_includedir) AC_SUBST(freetype_libdir) AC_SUBST(freetype_lib) AC_SUBST(freetype_objs) AC_ARG_WITH( freetype, [ --with-freetype[=LIB] Link FreeType library LIB [LIB=ttf]], if test "${withval}" = yes; then withval="ttf"; fi; if test "${withval}" = no; then withval=""; fi; if test "${withval}" = ""; then withval="ttf"; fi; freetype_lib=-l$withval; freetype_objs="VF_Ftype.lo VF_FtypeGBK.lo"; AC_DEFINE(WITH_FREETYPE)) AC_ARG_WITH( freetype-includedir, [ --with-freetype-includedir=DIR FreeType include files are in DIR], if test "${withval}" = yes; then withval=""; fi; if test "${withval}" = no; then withval=""; fi; if test "${withval}" = ""; then freetype_includedir="" else freetype_includedir=-I${withval}; fi) AC_ARG_WITH( freetype-libdir, [ --with-freetype-libdir=DIR FreeType library files are in DIR], if test "${withval}" = yes; then withval=""; fi; if test "${withval}" = no; then withval=""; fi; if test "${withval}" = ""; then freetype_libdir="" else freetype_libdir=-L${withval}; fi) if test -n "$freetype_lib" ; then echo "Enabled the TrueType font driver"; OLD_CPPFLAGS=${CPPFLAGS}; OLD_LIBS=${LIBS} CPPFLAGS="${freetype_includedir} ${CPPFLAGS}" LIBS="${freetype_libdir} ${freetype_lib} ${LIBS}"; AC_TRY_CPP([#include ], , AC_MSG_ERROR(Header file is not found: ${freetype_includedir})) dnl AC_TRY_LINK([#include ], dnl [TT_Engine FreeType_Engine; TT_Init_FreeType(&FreeType_Engine)], , dnl AC_MSG_ERROR(Library file is not found: ${freetype_lib})) CPPFLAGS=${OLD_CPPFLAGS}; LIBS=${OLD_LIBS} else echo "Disabled the TrueType font driver"; freetype_includedir=""; freetype_libdir=""; fi AC_SUBST(sony_fslib) AC_ARG_WITH(fslib, [ --with-fslib Compile VFlib 2 with Sony FSlib library], sony_fslib="-L/usr/sony/lib -lFSlib"; AC_DEFINE(WITH_FSLIB), sony_fslib="") if test -n "${sony_fslib}" ; then echo "Enabled the Sony FSlib driver"; else echo "Disabled the Sony FSlib font driver"; fi AC_CHECK_HEADERS(libintl.h) if test "X-${ac_cv_header_libintl_h}" = "X-yes"; then gettext="yes"; fi AC_ARG_WITH( gettext, [ --with-gettext Compile xgdvi with GNU gettext library], gettext="yes") AC_SUBST(gettext_lib) AC_SUBST(gettext_include) if test "X-${gettext}" = "X-no"; then gettext_lib="" gettext_include="" else AC_DEFINE(WITH_GETTEXT) AC_ARG_WITH( gettext_prefix, [ --with-gettext-prefix=DIR GNU gettext preffix direcotry is DIR], gettext_lib="-L${withval}/lib"; gettext_include="-I${withval}/include", gettext_lib='-L${prefix}/lib'; gettext_include='-I${prefix}/include') fi AC_TRY_LINK([#include ], [ bindtextdomain("xxx", "/usr/share/locale"); ], AC_MSG_RESULT(Use libc built-in gettext functions.); , AC_MSG_RESULT(Use external gettext library.); gettext_lib="${gettext_lib} -lintl") AC_PATH_X AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h strings.h string.h) AC_CHECK_FUNCS(memset) AC_CHECK_FUNCS(strchr) AC_CHECK_FUNCS(strdup) AC_TYPE_SIZE_T AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_OUTPUT(VFlib2-config Makefile make-sub src/Makefile tools/Imakefile) chmod a+x VFlib2-config (cd tools; ./run-xmkmf) dnl EOF