X-Git-Url: http://royale.zerezo.com/git/?p=FAPG;a=blobdiff_plain;f=configure.in;fp=configure.in;h=edf19be5bdfdf3e2480730a047523a81547a4524;hp=0000000000000000000000000000000000000000;hb=dfbf4f525560afb358cec09a9411712ded235b05;hpb=389b0b695d6dd0e98f3ad67a47d6f6e48ed1b62e diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..edf19be --- /dev/null +++ b/configure.in @@ -0,0 +1,77 @@ +# Process this file with autoconf to produce a configure script. +AC_PREREQ(2.61) +AC_INIT(fapg.c) +AM_INIT_AUTOMAKE(fapg, 0.39) + +AC_PROG_INSTALL +AC_PROG_CC +AC_HEADER_STDC + + +# XSPF +AC_ARG_ENABLE(xspf, [ +Extra options: + --enable-xspf enable XSPF support (default) + --disable-xspf disable XSPF support], [ + FAPG_XSPF=$enableval +], [ + FAPG_XSPF=1 +]) + +if test "${FAPG_XSPF}" = "1"; then + AC_MSG_NOTICE(XSPF support enabled (configure with --disable-xspf to disable)) +else + AC_MSG_NOTICE(XSPF support disabled) +fi + + +# uriparser +AC_ARG_WITH(uriparser, [ --with-uriparser=DIR override path of uriparser + ("/lib" and "/include" is appended)], [ + if test "x${withval}" = "x"; then + AC_MSG_ERROR([No path given for option --with-uriparser]) + fi + LDFLAGS="-L${withval}/lib ${LDFLAGS}" + CPPFLAGS="-I${withval}/include ${CPPFLAGS}" +], []) + +AC_ARG_WITH(uriparser-inc, [ --with-uriparser-inc=D override include path of uriparser], [ + if test "x${withval}" = "x"; then + AC_MSG_ERROR([No path given for option --with-uriparser-inc]) + fi + CPPFLAGS="-I${withval} ${CPPFLAGS}" +], []) + +AC_ARG_WITH(uriparser-lib, [ --with-uriparser-lib=D override library path of uriparser], [ + if test "x${withval}" = "x"; then + AC_MSG_ERROR([No path given for option --with-uriparser-lib]) + fi + LDFLAGS="-L${withval} ${LDFLAGS}" +], []) + + +# checks +if test "${FAPG_XSPF}" = "1"; then + URIPARSER_MISSING="Please install uriparser 0.6.3 or later. + On a Debian-based system enter 'sudo apt-get install liburiparser-dev'." + AC_CHECK_LIB(uriparser, uriParseUriA,, AC_MSG_ERROR(${URIPARSER_MISSING})) + AC_CHECK_HEADER(uriparser/Uri.h,, AC_MSG_ERROR(${URIPARSER_MISSING})) + + URIPARSER_TOO_OLD="uriparser 0.6.3 or later is required, your copy is too old." + AC_COMPILE_IFELSE([ +#include +#if (defined(URI_VER_MAJOR) && defined(URI_VER_MINOR) && defined(URI_VER_RELEASE) \ +&& ((URI_VER_MAJOR > 0) \ +|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR > 6)) \ +|| ((URI_VER_MAJOR == 0) && (URI_VER_MINOR == 6) && (URI_VER_RELEASE >= 3)) \ +)) +/* FINE */ +#else +# error uriparser not recent enough +#endif + ],,AC_MSG_ERROR(${URIPARSER_TOO_OLD})) +fi + + +AC_OUTPUT(Makefile) +