gmyth/configure.ac
branchtrunk
changeset 746 dc652fe5634d
parent 656 49f79548b1cc
child 821 411a01dfcd21
     1.1 --- a/gmyth/configure.ac	Tue May 15 21:54:05 2007 +0100
     1.2 +++ b/gmyth/configure.ac	Fri Jun 08 23:05:00 2007 +0100
     1.3 @@ -149,6 +149,20 @@
     1.4          CFLAGS="$CFLAGS -pg"
     1.5  fi
     1.6  
     1.7 +AC_ARG_ENABLE(upnp,
     1.8 +        AS_HELP_STRING([--enable-upnp],
     1.9 +                [enable clinkc's UPnP library (default = no)]),
    1.10 +                [
    1.11 +                        if test $enableval = no; then
    1.12 +                                USE_UPNP=no;
    1.13 +                        else
    1.14 +                                USE_UPNP=yes;
    1.15 +                        fi
    1.16 +                ],[
    1.17 +                        USE_UPNP=no;
    1.18 +                ]
    1.19 +)
    1.20 +
    1.21  # Check for pkgconfig
    1.22  AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.23  # Give error and exit if we don't have pkgconfig
    1.24 @@ -218,6 +232,16 @@
    1.25  AC_SUBST(LIBCURL_CFLAGS)
    1.26  AC_SUBST(LIBCURL_LIBS)
    1.27  
    1.28 +if [ test $USE_UPNP = yes ]; then
    1.29 +	# checks if the gmyth-upnp library can be found
    1.30 +	PKG_CHECK_MODULES(UPNP, gmyth-upnp, HAVE_UPNP=yes, HAVE_UPNP=no)
    1.31 +	if test "x$HAVE_UPNP" = "xyes"; then
    1.32 +		AC_DEFINE(HAVE_UPNP, 1, [GMyth UPnP library found!])
    1.33 +		CFLAGS="$CFLAGS -DHAVE_UPNP"
    1.34 +	fi
    1.35 +fi
    1.36 +
    1.37 +AM_CONDITIONAL(HAVE_UPNP, test "x$HAVE_UPNP" = "xyes")
    1.38  
    1.39  #
    1.40  # mysql libraries
    1.41 @@ -228,7 +252,6 @@
    1.42  fi
    1.43  AC_SUBST(MYSQL_CFLAGS)
    1.44  
    1.45 -
    1.46  AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs`)
    1.47  if test -z "$MYSQL_LIBS"; then
    1.48          AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])