gmyth-upnp/configure.ac
branchtrunk
changeset 250 ac3ca128dbca
child 252 0bddbe7eba51
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth-upnp/configure.ac	Wed Jan 10 17:19:07 2007 +0000
     1.3 @@ -0,0 +1,163 @@
     1.4 +#                                               -*- Autoconf -*-
     1.5 +# Process this file with autoconf to produce a configure script.
     1.6 +
     1.7 +AC_PREREQ(2.50)
     1.8 +
     1.9 +AC_INIT([gmyth-upnp],[0.1])
    1.10 +
    1.11 +AC_CONFIG_HEADER(config.h)
    1.12 +
    1.13 +dnl when going to/from release please set the nano (fourth number) right !
    1.14 +dnl releases only do Wall, SVN and prerelease does Werror too
    1.15 +AS_VERSION(gmyth-upnp, GMYTH_UPNP, 0, 1, 0, 3, GMYTH_UPNP_SVN="no", GMYTH_UPNP_SVN="yes")
    1.16 +GMYTH_UPNP_MAJORMINOR=$GMYTH_UPNP_MAJOR_VERSION.$GMYTH_UPNP_MINOR_VERSION
    1.17 +AC_SUBST(GMYTH_UPNP_MAJORMINOR)
    1.18 +
    1.19 +dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
    1.20 +AM_MAINTAINER_MODE
    1.21 +dnl make aclocal work in maintainer mode
    1.22 +AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
    1.23 +
    1.24 +# Checks for programs.
    1.25 +# check for tools
    1.26 +# Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
    1.27 +CFLAGS="$CFLAGS -Wall"
    1.28 +AC_PROG_CC
    1.29 +AC_PROG_LIBTOOL
    1.30 +
    1.31 +dnl Generate doxygen documentation
    1.32 +DX_HTML_FEATURE(ON)
    1.33 +DX_CHM_FEATURE(OFF)
    1.34 +DX_CHI_FEATURE(OFF)
    1.35 +DX_MAN_FEATURE(OFF)
    1.36 +DX_RTF_FEATURE(OFF)
    1.37 +DX_XML_FEATURE(OFF)
    1.38 +DX_PDF_FEATURE(OFF)
    1.39 +DX_PS_FEATURE(OFF)
    1.40 +DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
    1.41 +
    1.42 +# Checks for libraries.
    1.43 +
    1.44 +## Check for gmyth-0.1
    1.45 +PKG_CHECK_MODULES(LIBGMYTH, gmyth-0.1, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
    1.46 +
    1.47 +# Give error and exit if we don't have gmyth-0.1
    1.48 +if test "x$HAVE_LIBGMYTH" = "xno"; then
    1.49 +  AC_MSG_ERROR(you need gmyth-0.1 installed)
    1.50 +fi
    1.51 +
    1.52 +# make LIBXML_CFLAGS and LIBXML_LIBS available
    1.53 +AC_SUBST(LIBGMYTH_CFLAGS)
    1.54 +AC_SUBST(LIBGMYTH_LIBS)
    1.55 +
    1.56 +dnl ========== Check for Cyberlink UPnP Libraries
    1.57 +PKG_CHECK_MODULES(CYBERLINK, clinkc,
    1.58 +          HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
    1.59 +
    1.60 +if test "x$HAVE_CYBERLINK" = "xno"; then
    1.61 +  AC_MSG_ERROR(you need clinkc installed)
    1.62 +
    1.63 +dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available
    1.64 +AC_SUBST(CYBERLINK_CFLAGS)
    1.65 +AC_SUBST(CYBERLINK_LIBS)
    1.66 +
    1.67 +# Checks for header files.
    1.68 +AC_HEADER_STDC
    1.69 +AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
    1.70 +
    1.71 +# Checks for typedefs, structures, and compiler characteristics.
    1.72 +AC_C_CONST
    1.73 +AC_TYPE_PID_T
    1.74 +AC_STRUCT_TM
    1.75 +AC_HEADER_TIME
    1.76 +AC_HEADER_STDBOOL
    1.77 +
    1.78 +# Checks for library functions.
    1.79 +AC_FUNC_FORK
    1.80 +AC_FUNC_STRFTIME
    1.81 +AC_FUNC_SELECT_ARGTYPES
    1.82 +AC_PROG_GCC_TRADITIONAL
    1.83 +AC_FUNC_MALLOC
    1.84 +AC_FUNC_MKTIME
    1.85 +AC_FUNC_STRFTIME
    1.86 +AC_FUNC_VPRINTF
    1.87 +AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
    1.88 +
    1.89 +AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
    1.90 +
    1.91 +CFLAGS="$CFLAGS -I/usr/include"
    1.92 +LDFLAGS="$LDFLAGS -L/usr/lib"
    1.93 +
    1.94 +# Checks required packages
    1.95 +
    1.96 +dnl Test if --disable-debug given
    1.97 +AC_ARG_ENABLE(debug,
    1.98 +	AC_HELP_STRING([--disable-debug], [enable debugging mode]))
    1.99 +if test x"$enable_debug" != xno; then
   1.100 +    CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
   1.101 +else
   1.102 +    CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
   1.103 +fi          
   1.104 +
   1.105 +# Check for pkgconfig
   1.106 +AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
   1.107 +# Give error and exit if we don't have pkgconfig
   1.108 +if test "x$HAVE_PKGCONFIG" = "xno"; then
   1.109 +  AC_MSG_ERROR(you need to have pkgconfig installed !)
   1.110 +fi
   1.111 +
   1.112 +# Check for Glib2.0
   1.113 +PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
   1.114 +
   1.115 +# Give error and exit if we don't have glib
   1.116 +if test "x$HAVE_GLIB" = "xno"; then
   1.117 +  AC_MSG_ERROR(you need glib-2.0 installed)
   1.118 +fi
   1.119 +
   1.120 +# make GLIB_CFLAGS and GLIB_LIBS available
   1.121 +AC_SUBST(GLIB_CFLAGS)
   1.122 +AC_SUBST(GLIB_LIBS)
   1.123 +
   1.124 +# Check for GObject2.0
   1.125 +PKG_CHECK_MODULES(GOBJECT,
   1.126 +  gobject-2.0,
   1.127 +  HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
   1.128 +
   1.129 +# Give error and exit if we don't have gobject
   1.130 +if test "x$HAVE_GOBJECT" = "xno"; then
   1.131 +  AC_MSG_ERROR(you need gobject-2.0 installed)
   1.132 +fi
   1.133 +
   1.134 +# make GOBJECT_CFLAGS and GOBJECT_LIBS available
   1.135 +AC_SUBST(GOBJECT_CFLAGS)
   1.136 +AC_SUBST(GOBJECT_LIBS)
   1.137 +
   1.138 +##############################
   1.139 +# Checks for Network functions
   1.140 +##############################
   1.141 +
   1.142 +AC_CHECK_FUNCS([socket])
   1.143 +AC_CHECK_FUNCS([inet_ntoa])
   1.144 +AC_CHECK_HEADERS([ifaddrs.h])
   1.145 +AC_CHECK_FUNCS([getifaddrs])
   1.146 +AC_CHECK_FUNCS([time])
   1.147 +
   1.148 +#dnl Enable gtk-doc
   1.149 +#GTK_DOC_CHECK(1.4)
   1.150 +
   1.151 +AC_SUBST(CFLAGS)
   1.152 +AC_SUBST(LDFLAGS)
   1.153 +AC_SUBST(LIBS)
   1.154 +
   1.155 +AC_OUTPUT([
   1.156 +Makefile
   1.157 +src/Makefile
   1.158 +tests/Makefile
   1.159 +gmyth.pc])
   1.160 +
   1.161 +if test x"$enable_debug" != xno; then
   1.162 +    AC_MSG_NOTICE([Debug: Enabled])
   1.163 +else
   1.164 +    AC_MSG_NOTICE([Debug: Disabled])
   1.165 +fi          
   1.166 +