comparison 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
comparison
equal deleted inserted replaced
135:1d343a4eb657 136:2a9ac5ce2c7e
37 echo " --disable-dlna disable DLNA support" 37 echo " --disable-dlna disable DLNA support"
38 echo " --disable-nls do not use Native Language Support" 38 echo " --disable-nls do not use Native Language Support"
39 echo " --enable-b25 enable b25 support" 39 echo " --enable-b25 enable b25 support"
40 echo "" 40 echo ""
41 echo "Search paths:" 41 echo "Search paths:"
42 # echo " --with-libupnp-dir=DIR check for libupnp installed in DIR"
43 # echo " --with-libdlna-dir=DIR check for libdlna installed in DIR"
44 echo " --with-b25-dir=DIR check for libarib25 installed in DIR" 42 echo " --with-b25-dir=DIR check for libarib25 installed in DIR"
45 echo "" 43 echo ""
46 echo "Advanced options (experts only):" 44 echo "Advanced options (experts only):"
47 echo " --enable-debug enable debugging symbols" 45 echo " --enable-debug enable debugging symbols"
48 echo " --disable-debug disable debugging symbols" 46 echo " --disable-debug disable debugging symbols"
311 cross_compile="no" 309 cross_compile="no"
312 INSTALL="/usr/bin/install -c" 310 INSTALL="/usr/bin/install -c"
313 VERSION="1.1a" 311 VERSION="1.1a"
314 system_name=`uname -s 2>&1` 312 system_name=`uname -s 2>&1`
315 313
316 ######################################
317 # include libupnp & libdlna
318 ######################################
319 libupnp=`pwd`/libupnp-1.6.6
320 libdlna=`pwd`/libdlna-0.2.3
321 libupnp_build=`pwd`/libupnp-1.6.6/BUILD
322 libdlna_build=`pwd`/libdlna-0.2.3/BUILD
323 libupnp_inc=`pwd`/libupnp-1.6.6/INCLUDE
324 libdlna_inc=`pwd`/libdlna-0.2.3/INCLUDE
325
326 sh -c "cd $libupnp && ./configure --prefix=$libupnp --libdir=$libupnp_build --includedir=$libupnp_inc --disable-shared && make && make install && cd .." || die "$libupnp setup failed."
327 sh -c "cd $libdlna && ./configure --prefix=$libdlna --libdir=$libdlna_build --includedir=$libdlna_inc --disable-shared && make && make install && cd .." || die "$libdlna setup failed."
328
329 add_cflags -I`pwd`
330 add_cflags -I`pwd`/src
331 add_cflags -I$libupnp_inc
332 add_cflags -I$libdlna_inc
333
334 add_ldflags $libupnp_build/libixml.a
335 add_ldflags $libupnp_build/libupnp.a
336 add_ldflags $libupnp_build/libthreadutil.a
337 add_ldflags $libdlna_build/libdlna.a
338 add_extralibs -lavformat
339 add_extralibs -lrt
340
341 ################################################# 314 #################################################
342 # set cpu variable and specific cpu flags 315 # set cpu variable and specific cpu flags
343 ################################################# 316 #################################################
344 case "$cpu" in 317 case "$cpu" in
345 i386|i486|i586|i686|i86pc|BePC) 318 i386|i486|i586|i686|i86pc|BePC)
437 ;; 410 ;;
438 --sysconfdir=*) sysconfdir="$optval"; 411 --sysconfdir=*) sysconfdir="$optval";
439 ;; 412 ;;
440 --localedir=*) localedir="$optval"; 413 --localedir=*) localedir="$optval";
441 ;; 414 ;;
442 # --with-libupnp-dir=*) libupnpdir="$optval";
443 # ;;
444 # --with-libdlna-dir=*) libdlnadir="$optval";
445 # ;;
446 --with-b25-dir=*) libb25dir="$optval"; 415 --with-b25-dir=*) libb25dir="$optval";
447 ;; 416 ;;
448 --disable-nls) nls="no" 417 --disable-nls) nls="no"
449 ;; 418 ;;
450 --enable-dlna) dlna="yes" 419 --enable-dlna) dlna="yes"
661 # check for iconv (optional) 630 # check for iconv (optional)
662 ################################################# 631 #################################################
663 echolog "Checking for iconv ..." 632 echolog "Checking for iconv ..."
664 check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV 633 check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV
665 634
666 ##################################################
667 ## check for libupnp and friends (mandatory)
668 ##################################################
669 #if [ -n "$libupnpdir" ]; then
670 # check_cflags -I$libupnpdir/include
671 # check_ldflags -L$libupnpdir/lib
672 #fi
673 #
674 #echolog "Checking for libixml ..."
675 #check_lib upnp/ixml.h ixmlRelaxParser -lixml || die "Error, can't find libixml !"
676 #
677 #echolog "Checking for libthreadutil ..."
678 #check_lib upnp/ThreadPool.h ThreadPoolAdd "-lthreadutil -lpthread" || die "Error, can't find libthreadutil !"
679 #add_extralibs -lpthread
680 #
681 #libupnp_min_version="1.4.2"
682 #echolog "Checking for libupnp >= $libupnp_min_version ..."
683 #check_lib upnp/upnp.h UpnpSetMaxContentLength -lupnp || die "Error, can't find libupnp !"
684 #check_lib_version libupnp $libupnp_min_version || die "Error, libupnp < $libupnp_min_version !"
685 #add_cflags `pkg-config libupnp --cflags`
686 #add_extralibs `pkg-config libupnp --libs`
687 #
688 ##################################################
689 ## check for libdlna (mandatory if enabled)
690 ##################################################
691 #if test "$dlna" = "yes"; then
692 # libdlna_min_version="0.2.1"
693 # echolog "Checking for libdlna >= $libdlna_min_version ..."
694 # if [ -n "$libdlnadir" ]; then
695 # check_cflags -I$libdlnadir/include
696 # check_ldflags -L$libdlnadir/lib
697 # fi
698 # check_lib dlna.h dlna_register_all_media_profiles -ldlna || die "Error, can't find libdlna (install it or use --disable-dlna) !"
699 ## check_lib_version libdlna $libdlna_min_version || die "Error, libdlna < $libdlna_min_version !"
700 # add_cflags -DHAVE_DLNA
701 # add_cflags `pkg-config libdlna --cflags`
702 # add_extralibs `pkg-config libdlna --libs`
703 #fi
704
705 ################################################# 635 #################################################
706 # check for libarib25 (mandatory if enabled) 636 # check for libarib25 (mandatory if enabled)
707 ################################################# 637 #################################################
708 if test "$b25" = "yes"; then 638 if test "$b25" = "yes"; then
709 b25_min_version="0.1.8" 639 b25_min_version="0.1.8"
717 add_cflags -DHAVE_LIBARIB25 647 add_cflags -DHAVE_LIBARIB25
718 add_cflags `pkg-config libarib25 pcsclite --cflags` 648 add_cflags `pkg-config libarib25 pcsclite --cflags`
719 add_extralibs `pkg-config libarib25 pcsclite --libs` 649 add_extralibs `pkg-config libarib25 pcsclite --libs`
720 fi 650 fi
721 651
652 #################################################
653 # check for libdlna
654 #################################################
722 # force use DLNA 655 # force use DLNA
723 add_cflags -DHAVE_DLNA 656 if test "$dlna" = "yes"; then
657 add_cflags -DHAVE_DLNA
658 add_cflags `pkg-config libupnp --cflags`
659 add_cflags `pkg-config libdlna --cflags`
660
661 add_extralibs `pkg-config libupnp --libs`
662 add_extralibs `pkg-config libdlna --libs`
663 add_extralibs -lrt
664 fi
724 665
725 ################################################# 666 #################################################
726 # logging result 667 # logging result
727 ################################################# 668 #################################################
728 echolog "" 669 echolog ""
729 echolog "recpt1: configure is OK" 670 echolog "recpt1: configure is OK"
730 echolog " version $VERSION" 671 echolog " version $VERSION"
731 #echolog " using libupnp `pkg-config libupnp --modversion`"
732 #test $dlna = yes && echolog " using libdlna `pkg-config libdlna --modversion`"
733 test $b25 = yes && echolog " using libb25 `pkg-config libb25 --modversion`" 672 test $b25 = yes && echolog " using libb25 `pkg-config libb25 --modversion`"
734 echolog "configuration:" 673 echolog "configuration:"
735 echolog " install prefix $PREFIX" 674 echolog " install prefix $PREFIX"
736 echolog " configuration dir $sysconfdir" 675 echolog " configuration dir $sysconfdir"
737 echolog " locales dir $localedir" 676 echolog " locales dir $localedir"
738 echolog " NLS support $nls" 677 echolog " NLS support $nls"
739 #echolog " DLNA support $dlna"
740 echolog " B25 support $b25" 678 echolog " B25 support $b25"
679 echolog " DLNA support $dlna"
741 echolog " C compiler $cc" 680 echolog " C compiler $cc"
742 echolog " STRIP $strip" 681 echolog " STRIP $strip"
743 echolog " make $make" 682 echolog " make $make"
744 echolog " CPU $cpu ($tune)" 683 echolog " CPU $cpu ($tune)"
745 echolog " debug symbols $debug" 684 echolog " debug symbols $debug"