diff configure @ 136:2a9ac5ce2c7e

Remove internal libdlna and libupnp.(using OS package by default)
author Naoya OYAMA <naoya.oyama@gmail.com>
date Wed, 27 Jun 2012 23:41:49 +0900
parents 4f6d9621ee00
children 5eab7c73a28a
line wrap: on
line diff
--- a/configure	Sun Oct 24 21:50:50 2010 +0900
+++ b/configure	Wed Jun 27 23:41:49 2012 +0900
@@ -39,8 +39,6 @@
   echo "  --enable-b25                enable b25 support"
   echo ""
   echo "Search paths:"
-#  echo "  --with-libupnp-dir=DIR      check for libupnp installed in DIR"
-#  echo "  --with-libdlna-dir=DIR      check for libdlna installed in DIR"
   echo "  --with-b25-dir=DIR          check for libarib25 installed in DIR"
   echo ""
   echo "Advanced options (experts only):"
@@ -313,31 +311,6 @@
 VERSION="1.1a"
 system_name=`uname -s 2>&1`
 
-######################################
-# include libupnp & libdlna
-######################################
-libupnp=`pwd`/libupnp-1.6.6
-libdlna=`pwd`/libdlna-0.2.3
-libupnp_build=`pwd`/libupnp-1.6.6/BUILD
-libdlna_build=`pwd`/libdlna-0.2.3/BUILD
-libupnp_inc=`pwd`/libupnp-1.6.6/INCLUDE
-libdlna_inc=`pwd`/libdlna-0.2.3/INCLUDE
-
-sh -c "cd $libupnp && ./configure --prefix=$libupnp --libdir=$libupnp_build  --includedir=$libupnp_inc --disable-shared && make && make install && cd .." || die "$libupnp setup failed."
-sh -c "cd $libdlna && ./configure --prefix=$libdlna --libdir=$libdlna_build  --includedir=$libdlna_inc --disable-shared && make && make install && cd .." || die "$libdlna setup failed."
-
-add_cflags -I`pwd`
-add_cflags -I`pwd`/src
-add_cflags -I$libupnp_inc
-add_cflags -I$libdlna_inc
-
-add_ldflags $libupnp_build/libixml.a
-add_ldflags $libupnp_build/libupnp.a
-add_ldflags $libupnp_build/libthreadutil.a
-add_ldflags $libdlna_build/libdlna.a
-add_extralibs -lavformat
-add_extralibs -lrt
-
 #################################################
 #   set cpu variable and specific cpu flags
 #################################################
@@ -439,10 +412,6 @@
   ;;
   --localedir=*) localedir="$optval";
   ;;
-#  --with-libupnp-dir=*) libupnpdir="$optval";
-#  ;;
-#  --with-libdlna-dir=*) libdlnadir="$optval";
-#  ;;
   --with-b25-dir=*) libb25dir="$optval";
   ;;
   --disable-nls) nls="no"
@@ -663,45 +632,6 @@
 echolog "Checking for iconv ..."
 check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV
 
-##################################################
-##   check for libupnp and friends (mandatory)
-##################################################
-#if [ -n "$libupnpdir" ]; then
-#  check_cflags -I$libupnpdir/include
-#  check_ldflags -L$libupnpdir/lib
-#fi
-#
-#echolog "Checking for libixml ..."
-#check_lib upnp/ixml.h ixmlRelaxParser -lixml || die "Error, can't find libixml !"
-#
-#echolog "Checking for libthreadutil ..."
-#check_lib upnp/ThreadPool.h ThreadPoolAdd "-lthreadutil -lpthread" || die "Error, can't find libthreadutil !"
-#add_extralibs -lpthread
-#
-#libupnp_min_version="1.4.2"
-#echolog "Checking for libupnp >= $libupnp_min_version ..."
-#check_lib upnp/upnp.h UpnpSetMaxContentLength -lupnp || die "Error, can't find libupnp !"
-#check_lib_version libupnp $libupnp_min_version || die "Error, libupnp < $libupnp_min_version !"
-#add_cflags `pkg-config libupnp --cflags`
-#add_extralibs `pkg-config libupnp --libs`
-#
-##################################################
-##   check for libdlna (mandatory if enabled)
-##################################################
-#if test "$dlna" = "yes"; then
-#  libdlna_min_version="0.2.1"
-#  echolog "Checking for libdlna >= $libdlna_min_version ..."
-#  if [ -n "$libdlnadir" ]; then
-#    check_cflags -I$libdlnadir/include
-#    check_ldflags -L$libdlnadir/lib
-#  fi
-#  check_lib dlna.h dlna_register_all_media_profiles -ldlna || die "Error, can't find libdlna (install it or use --disable-dlna) !"
-##  check_lib_version libdlna $libdlna_min_version || die "Error, libdlna < $libdlna_min_version !"
-#  add_cflags -DHAVE_DLNA
-#  add_cflags `pkg-config libdlna --cflags`
-#  add_extralibs `pkg-config libdlna --libs`
-#fi
-
 #################################################
 #   check for libarib25 (mandatory if enabled)
 #################################################
@@ -719,8 +649,19 @@
   add_extralibs `pkg-config libarib25 pcsclite --libs`
 fi
 
+#################################################
+#   check for libdlna
+#################################################
 # force use DLNA
-add_cflags -DHAVE_DLNA
+if test "$dlna" = "yes"; then
+  add_cflags -DHAVE_DLNA
+  add_cflags `pkg-config libupnp --cflags`
+  add_cflags `pkg-config libdlna --cflags`
+
+  add_extralibs `pkg-config libupnp --libs`
+  add_extralibs `pkg-config libdlna --libs`
+  add_extralibs -lrt
+fi
 
 #################################################
 #   logging result
@@ -728,16 +669,14 @@
 echolog ""
 echolog "recpt1: configure is OK"
 echolog "  version            $VERSION"
-#echolog "  using libupnp      `pkg-config libupnp --modversion`"
-#test $dlna = yes && echolog "  using libdlna      `pkg-config libdlna --modversion`"
 test $b25 = yes && echolog "  using libb25      `pkg-config libb25 --modversion`"
 echolog "configuration:"
 echolog "  install prefix     $PREFIX"
 echolog "  configuration dir  $sysconfdir"
 echolog "  locales dir        $localedir"
 echolog "  NLS support        $nls"
-#echolog "  DLNA support       $dlna"
 echolog "  B25 support        $b25"
+echolog "  DLNA support       $dlna"
 echolog "  C compiler         $cc"
 echolog "  STRIP              $strip"
 echolog "  make               $make"