gmyth-upnp/configure.ac
branchtrunk
changeset 253 ef26dbeb7a5b
parent 249 dcf6bffe29a1
child 259 4644bd396464
     1.1 --- a/gmyth-upnp/configure.ac	Wed Jan 10 17:18:36 2007 +0000
     1.2 +++ b/gmyth-upnp/configure.ac	Wed Jan 10 20:35:17 2007 +0000
     1.3 @@ -34,33 +34,17 @@
     1.4  DX_XML_FEATURE(OFF)
     1.5  DX_PDF_FEATURE(OFF)
     1.6  DX_PS_FEATURE(OFF)
     1.7 -DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
     1.8 +DX_INIT_DOXYGEN(gmyth-upnp, doxygen.cfg, docs)
     1.9  
    1.10  # Checks for libraries.
    1.11  
    1.12 -## Check for gmyth-0.1
    1.13 -PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
    1.14 -
    1.15 -# Give error and exit if we don't have gmyth-0.1
    1.16 -if test "x$HAVE_LIBGMYTH" = "xno"; then
    1.17 -  AC_MSG_ERROR(you need gmyth-0.1 installed)
    1.18 +# Check for pkgconfig
    1.19 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.20 +# Give error and exit if we don't have pkgconfig
    1.21 +if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.22 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.23  fi
    1.24  
    1.25 -# make LIBXML_CFLAGS and LIBXML_LIBS available
    1.26 -AC_SUBST(LIBGMYTH_CFLAGS)
    1.27 -AC_SUBST(LIBGMYTH_LIBS)
    1.28 -
    1.29 -dnl ========== Check for Cyberlink UPnP Libraries
    1.30 -PKG_CHECK_MODULES(CYBERLINK, clinkc,
    1.31 -          HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
    1.32 -
    1.33 -if test "x$HAVE_CYBERLINK" = "xno"; then
    1.34 -  AC_MSG_ERROR(you need clinkc installed)
    1.35 -
    1.36 -dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available
    1.37 -AC_SUBST(CYBERLINK_CFLAGS)
    1.38 -AC_SUBST(CYBERLINK_LIBS)
    1.39 -
    1.40  # Checks for header files.
    1.41  AC_HEADER_STDC
    1.42  AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    1.43 @@ -83,6 +67,16 @@
    1.44  AC_FUNC_VPRINTF
    1.45  AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
    1.46  
    1.47 +##############################
    1.48 +# Checks for Network functions
    1.49 +##############################
    1.50 +
    1.51 +AC_CHECK_FUNCS([socket])
    1.52 +AC_CHECK_FUNCS([inet_ntoa])
    1.53 +AC_CHECK_HEADERS([ifaddrs.h])
    1.54 +AC_CHECK_FUNCS([getifaddrs])
    1.55 +AC_CHECK_FUNCS([time])
    1.56 +
    1.57  AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.58  
    1.59  CFLAGS="$CFLAGS -I/usr/include"
    1.60 @@ -97,14 +91,7 @@
    1.61      CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
    1.62  else
    1.63      CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
    1.64 -fi          
    1.65 -
    1.66 -# Check for pkgconfig
    1.67 -AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    1.68 -# Give error and exit if we don't have pkgconfig
    1.69 -if test "x$HAVE_PKGCONFIG" = "xno"; then
    1.70 -  AC_MSG_ERROR(you need to have pkgconfig installed !)
    1.71 -fi
    1.72 +fi 
    1.73  
    1.74  # Check for Glib2.0
    1.75  PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
    1.76 @@ -132,30 +119,39 @@
    1.77  AC_SUBST(GOBJECT_CFLAGS)
    1.78  AC_SUBST(GOBJECT_LIBS)
    1.79  
    1.80 -##############################
    1.81 -# Checks for Network functions
    1.82 -##############################
    1.83 +## Check for gmyth-0.1
    1.84 +PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
    1.85  
    1.86 -AC_CHECK_FUNCS([socket])
    1.87 -AC_CHECK_FUNCS([inet_ntoa])
    1.88 -AC_CHECK_HEADERS([ifaddrs.h])
    1.89 -AC_CHECK_FUNCS([getifaddrs])
    1.90 -AC_CHECK_FUNCS([time])
    1.91 +# Give error and exit if we don't have gmyth-0.1
    1.92 +if test "x$HAVE_LIBGMYTH" = "xno"; then
    1.93 +  AC_MSG_ERROR([you need gmyth-0.1 installed])
    1.94 +fi
    1.95 +
    1.96 +# make LIBXML_CFLAGS and LIBXML_LIBS available
    1.97 +AC_SUBST(LIBGMYTH_CFLAGS)
    1.98 +AC_SUBST(LIBGMYTH_LIBS)
    1.99 +
   1.100 +dnl ========== Check for Cyberlink UPnP Libraries
   1.101 +PKG_CHECK_MODULES(CYBERLINK, clinkc,
   1.102 +          HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
   1.103 +
   1.104 +if test "x$HAVE_CYBERLINK" = "xno"; then
   1.105 +  AC_MSG_ERROR([you need clinkc installed])
   1.106 +fi
   1.107 +
   1.108 +dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available
   1.109 +AC_SUBST(CYBERLINK_CFLAGS)
   1.110 +AC_SUBST(CYBERLINK_LIBS)
   1.111  
   1.112  #dnl Enable gtk-doc
   1.113  #GTK_DOC_CHECK(1.4)
   1.114  
   1.115 -AC_SUBST(CFLAGS)
   1.116 -AC_SUBST(LDFLAGS)
   1.117 -AC_SUBST(LIBS)
   1.118 -
   1.119  AC_OUTPUT([
   1.120  Makefile
   1.121  src/Makefile
   1.122 -tests/Makefile
   1.123 -gmyth.pc])
   1.124 +gmyth-upnp.pc])
   1.125  
   1.126 -if test x"$enable_debug" != xno; then
   1.127 +if test "x$enable_debug" != "xno"; then
   1.128      AC_MSG_NOTICE([Debug: Enabled])
   1.129  else
   1.130      AC_MSG_NOTICE([Debug: Disabled])