diff -r dcf6bffe29a1 -r ef26dbeb7a5b gmyth-upnp/configure.ac --- a/gmyth-upnp/configure.ac Wed Jan 10 17:18:36 2007 +0000 +++ b/gmyth-upnp/configure.ac Wed Jan 10 20:35:17 2007 +0000 @@ -34,33 +34,17 @@ DX_XML_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) -DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs) +DX_INIT_DOXYGEN(gmyth-upnp, doxygen.cfg, docs) # Checks for libraries. -## Check for gmyth-0.1 -PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no) - -# Give error and exit if we don't have gmyth-0.1 -if test "x$HAVE_LIBGMYTH" = "xno"; then - AC_MSG_ERROR(you need gmyth-0.1 installed) +# Check for pkgconfig +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) +# Give error and exit if we don't have pkgconfig +if test "x$HAVE_PKGCONFIG" = "xno"; then + AC_MSG_ERROR(you need to have pkgconfig installed !) fi -# make LIBXML_CFLAGS and LIBXML_LIBS available -AC_SUBST(LIBGMYTH_CFLAGS) -AC_SUBST(LIBGMYTH_LIBS) - -dnl ========== Check for Cyberlink UPnP Libraries -PKG_CHECK_MODULES(CYBERLINK, clinkc, - HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no) - -if test "x$HAVE_CYBERLINK" = "xno"; then - AC_MSG_ERROR(you need clinkc installed) - -dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available -AC_SUBST(CYBERLINK_CFLAGS) -AC_SUBST(CYBERLINK_LIBS) - # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h]) @@ -83,6 +67,16 @@ AC_FUNC_VPRINTF AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime]) +############################## +# Checks for Network functions +############################## + +AC_CHECK_FUNCS([socket]) +AC_CHECK_FUNCS([inet_ntoa]) +AC_CHECK_HEADERS([ifaddrs.h]) +AC_CHECK_FUNCS([getifaddrs]) +AC_CHECK_FUNCS([time]) + AM_INIT_AUTOMAKE($PACKAGE, $VERSION) CFLAGS="$CFLAGS -I/usr/include" @@ -97,14 +91,7 @@ CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG" else CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS" -fi - -# Check for pkgconfig -AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) -# Give error and exit if we don't have pkgconfig -if test "x$HAVE_PKGCONFIG" = "xno"; then - AC_MSG_ERROR(you need to have pkgconfig installed !) -fi +fi # Check for Glib2.0 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no) @@ -132,30 +119,39 @@ AC_SUBST(GOBJECT_CFLAGS) AC_SUBST(GOBJECT_LIBS) -############################## -# Checks for Network functions -############################## +## Check for gmyth-0.1 +PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no) -AC_CHECK_FUNCS([socket]) -AC_CHECK_FUNCS([inet_ntoa]) -AC_CHECK_HEADERS([ifaddrs.h]) -AC_CHECK_FUNCS([getifaddrs]) -AC_CHECK_FUNCS([time]) +# Give error and exit if we don't have gmyth-0.1 +if test "x$HAVE_LIBGMYTH" = "xno"; then + AC_MSG_ERROR([you need gmyth-0.1 installed]) +fi + +# make LIBXML_CFLAGS and LIBXML_LIBS available +AC_SUBST(LIBGMYTH_CFLAGS) +AC_SUBST(LIBGMYTH_LIBS) + +dnl ========== Check for Cyberlink UPnP Libraries +PKG_CHECK_MODULES(CYBERLINK, clinkc, + HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no) + +if test "x$HAVE_CYBERLINK" = "xno"; then + AC_MSG_ERROR([you need clinkc installed]) +fi + +dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available +AC_SUBST(CYBERLINK_CFLAGS) +AC_SUBST(CYBERLINK_LIBS) #dnl Enable gtk-doc #GTK_DOC_CHECK(1.4) -AC_SUBST(CFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(LIBS) - AC_OUTPUT([ Makefile src/Makefile -tests/Makefile -gmyth.pc]) +gmyth-upnp.pc]) -if test x"$enable_debug" != xno; then +if test "x$enable_debug" != "xno"; then AC_MSG_NOTICE([Debug: Enabled]) else AC_MSG_NOTICE([Debug: Disabled])