diff configure @ 129:4f6d9621ee00

add multi session streaming & add depending librarys. - libupnp-1.6.6 - libdlna-0.2.3
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 10 Oct 2010 15:33:18 +0900
parents 3a7d8d2f0585
children 2a9ac5ce2c7e
line wrap: on
line diff
--- a/configure	Tue Oct 05 01:55:54 2010 +0900
+++ b/configure	Sun Oct 10 15:33:18 2010 +0900
@@ -39,8 +39,8 @@
   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-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,6 +313,31 @@
 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
 #################################################
@@ -414,10 +439,10 @@
   ;;
   --localedir=*) localedir="$optval";
   ;;
-  --with-libupnp-dir=*) libupnpdir="$optval";
-  ;;
-  --with-libdlna-dir=*) libdlnadir="$optval";
-  ;;
+#  --with-libupnp-dir=*) libupnpdir="$optval";
+#  ;;
+#  --with-libdlna-dir=*) libdlnadir="$optval";
+#  ;;
   --with-b25-dir=*) libb25dir="$optval";
   ;;
   --disable-nls) nls="no"
@@ -593,7 +618,6 @@
 check_cflags -D_FILE_OFFSET_BITS=64
 check_cflags -D_REENTRANT
 linux && add_cflags -D_GNU_SOURCE
-add_extralibs "-lrt"
 
 #################################################
 #   check for debug symbols
@@ -639,44 +663,44 @@
 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 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)
@@ -695,21 +719,24 @@
   add_extralibs `pkg-config libarib25 pcsclite --libs`
 fi
 
+# force use DLNA
+add_cflags -DHAVE_DLNA
+
 #################################################
 #   logging result
 #################################################
 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`"
+#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 "  DLNA support       $dlna"
 echolog "  B25 support        $b25"
 echolog "  C compiler         $cc"
 echolog "  STRIP              $strip"