Mercurial > pt1.oyama
annotate configure @ 158:6fab243c91ab
Fix problem BS-17 can not be recorded.
author | Naoya OYAMA <naoya.oyama@gmail.com> |
---|---|
date | Mon, 10 Sep 2012 20:32:20 +0900 |
parents | faa0bc5fc2f5 |
children | ac23a9b417a2 |
rev | line source |
---|---|
125 | 1 #!/bin/sh |
2 # | |
3 # recpt1 configure script - (c) 2007 Benjamin Zores | |
4 # | |
5 # (fully inspirated from ffmpeg configure script, thanks to Fabrice Bellard) | |
6 # | |
7 | |
8 # make sure we are running under a compatible shell | |
9 unset foo | |
10 (: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null | |
11 if test "$?" != 0; then | |
12 if test "x$USHARE_CONFIGURE_EXEC" = x; then | |
13 USHARE_CONFIGURE_EXEC=1 | |
14 export USHARE_CONFIGURE_EXEC | |
15 exec bash "$0" "$@" | |
16 exec ksh "$0" "$@" | |
17 exec /usr/xpg4/bin/sh "$0" "$@" | |
18 fi | |
19 echo "No compatible shell script interpreter found." | |
20 exit 1 | |
21 fi | |
22 | |
23 show_help(){ | |
24 echo "Usage: configure [options]" | |
25 echo "Options: [defaults in brackets after descriptions]" | |
26 echo | |
27 echo "Standard options:" | |
28 echo " --help print this message" | |
29 echo " --log[=FILE|yes|no] log tests and output to FILE [config.log]" | |
30 echo " --prefix=PREFIX install in PREFIX [$PREFIX]" | |
31 echo " --bindir=DIR install binaries in DIR [PREFIX/bin]" | |
32 echo " --sysconfdir=DIR configuration files DIR [PREFIX/etc]" | |
33 echo " --localedir=DIR use locales from DIR [PREFIX/share/locale]" | |
34 echo "" | |
35 echo "Extended options:" | |
36 echo " --enable-dlna enable DLNA support through libldna" | |
37 echo " --disable-dlna disable DLNA support" | |
38 echo " --disable-nls do not use Native Language Support" | |
39 echo " --enable-b25 enable b25 support" | |
40 echo "" | |
41 echo "Search paths:" | |
42 echo " --with-b25-dir=DIR check for libarib25 installed in DIR" | |
43 echo "" | |
44 echo "Advanced options (experts only):" | |
45 echo " --enable-debug enable debugging symbols" | |
46 echo " --disable-debug disable debugging symbols" | |
47 echo " --disable-strip disable stripping of executables at installation" | |
48 echo " --disable-optimize disable compiler optimization" | |
49 echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]" | |
50 echo " --cross-compile assume a cross-compiler is used" | |
51 exit 1 | |
52 } | |
53 | |
54 log(){ | |
55 echo "$@" >>$logfile | |
56 } | |
57 | |
58 log_file(){ | |
59 log BEGIN $1 | |
60 cat -n $1 >>$logfile | |
61 log END $1 | |
62 } | |
63 | |
64 echolog(){ | |
65 log "$@" | |
66 echo "$@" | |
67 } | |
68 | |
69 clean(){ | |
70 rm -f $TMPC $TMPO $TMPE $TMPS | |
71 } | |
72 | |
73 die(){ | |
74 echolog "$@" | |
75 if enabled logging; then | |
76 echo "See file \"$logfile\" produced by configure for more details." | |
77 else | |
78 echo "Rerun configure with logging enabled (do not use --log=no) for more details." | |
79 fi | |
80 clean | |
81 exit 1 | |
82 } | |
83 | |
84 enabled(){ | |
85 eval test "x\$$1" = "xyes" | |
86 } | |
87 | |
88 flags_saved(){ | |
89 (: ${SAVE_CFLAGS?}) 2>/dev/null | |
90 } | |
91 | |
92 save_flags(){ | |
93 flags_saved && return | |
94 SAVE_CFLAGS="$CFLAGS" | |
95 SAVE_LDFLAGS="$LDFLAGS" | |
96 SAVE_extralibs="$extralibs" | |
97 } | |
98 | |
99 restore_flags(){ | |
100 CFLAGS="$SAVE_CFLAGS" | |
101 LDFLAGS="$SAVE_LDFLAGS" | |
102 extralibs="$SAVE_extralibs" | |
103 unset SAVE_CFLAGS | |
104 unset SAVE_LDFLAGS | |
105 unset SAVE_extralibs | |
106 } | |
107 | |
108 temp_cflags(){ | |
109 temp_append CFLAGS "$@" | |
110 } | |
111 | |
112 temp_ldflags(){ | |
113 temp_append LDFLAGS "$@" | |
114 } | |
115 | |
116 temp_extralibs(){ | |
117 temp_append extralibs "$@" | |
118 } | |
119 | |
120 temp_append(){ | |
121 local var | |
122 var=$1 | |
123 shift | |
124 save_flags | |
125 append_var "$var" "$@" | |
126 } | |
127 | |
128 append_var(){ | |
129 local var f | |
130 var=$1 | |
131 shift | |
132 for f in $@; do | |
133 if eval echo \$$var | grep -qv -e "$f"; then | |
134 eval "$var=\"\$$var $f\"" | |
135 fi | |
136 done | |
137 } | |
138 | |
139 append(){ | |
140 local var | |
141 var=$1 | |
142 shift | |
143 flags_saved && append_var "SAVE_$var" "$@" | |
144 append_var "$var" "$@" | |
145 } | |
146 | |
147 add_cflags(){ | |
148 append CFLAGS "$@" | |
149 } | |
150 | |
151 add_ldflags(){ | |
152 append LDFLAGS "$@" | |
153 } | |
154 | |
155 add_extralibs(){ | |
156 append extralibs "$@" | |
157 } | |
158 | |
159 add_clog(){ | |
160 echo "#define $1 $2" >> $CONFIG_H | |
161 } | |
162 | |
163 add_clog_str(){ | |
164 echo "#define $1 \"$2\"" >> $CONFIG_H | |
165 } | |
166 | |
167 check_cmd(){ | |
168 log "$@" | |
169 "$@" >>$logfile 2>&1 | |
170 } | |
171 | |
172 check_cc(){ | |
173 log check_cc "$@" | |
174 cat >$TMPC | |
175 log_file $TMPC | |
176 check_cmd $cc $CFLAGS "$@" -c -o $TMPO $TMPC | |
177 } | |
178 | |
179 check_cpp(){ | |
180 log check_cpp "$@" | |
181 cat >$TMPC | |
182 log_file $TMPC | |
183 check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC | |
184 } | |
185 | |
186 check_ld(){ | |
187 log check_ld "$@" | |
188 check_cc || return | |
189 check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs | |
190 } | |
191 | |
192 check_exec(){ | |
193 check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; } | |
194 } | |
195 | |
196 check_cflags(){ | |
197 log check_cflags "$@" | |
198 check_cc "$@" <<EOF && add_cflags "$@" | |
199 int x; | |
200 EOF | |
201 } | |
202 | |
203 check_ldflags(){ | |
204 log check_ldflags "$@" | |
205 check_ld "$@" <<EOF && add_ldflags "$@" | |
206 int main(){ | |
207 return 0; | |
208 } | |
209 EOF | |
210 } | |
211 | |
212 check_header(){ | |
213 local header | |
214 log check_header "$@" | |
215 header=$1 | |
216 shift | |
217 check_cpp "$@" <<EOF | |
218 #include <$header> | |
219 int x; | |
220 EOF | |
221 } | |
222 | |
223 check_func(){ | |
224 local func | |
225 log check_func "$@" | |
226 func=$1 | |
227 shift | |
228 check_ld "$@" <<EOF | |
229 extern int $func(); | |
230 int main(){ | |
231 $func(); | |
232 return 0; | |
233 } | |
234 EOF | |
235 } | |
236 | |
237 check_lib(){ | |
238 local header func err | |
239 log check_lib "$@" | |
240 header="$1" | |
241 func="$2" | |
242 shift 2 | |
243 temp_extralibs "$@" | |
244 check_header $header && check_func $func && add_extralibs "$@" | |
245 err=$? | |
246 restore_flags | |
247 return $err | |
248 } | |
249 | |
250 check_lib_version() { | |
251 check_cmd pkg-config "$1" --atleast-version="$2" | |
252 err=$? | |
253 return $err | |
254 } | |
255 | |
256 append_config(){ | |
257 echo "$@" >> $CONFIGFILE | |
258 } | |
259 | |
260 expand_var(){ | |
261 v="$1" | |
262 while true; do | |
263 eval t="$v" | |
264 test "$t" = "$v" && break | |
265 v="$t" | |
266 done | |
267 echo "$v" | |
268 } | |
269 | |
270 # set temporary file name | |
271 if test ! -z "$TMPDIR" ; then | |
272 TMPDIR1="${TMPDIR}" | |
273 elif test ! -z "$TEMPDIR" ; then | |
274 TMPDIR1="${TEMPDIR}" | |
275 else | |
276 TMPDIR1="/tmp" | |
277 fi | |
278 | |
279 TMPC="${TMPDIR1}/recpt1-${RANDOM}-$$-${RANDOM}.c" | |
280 TMPO="${TMPDIR1}/recpt1-${RANDOM}-$$-${RANDOM}.o" | |
281 TMPE="${TMPDIR1}/recpt1-${RANDOM}-$$-${RANDOM}" | |
282 TMPS="${TMPDIR1}/recpt1-${RANDOM}-$$-${RANDOM}.S" | |
283 | |
284 CONFIGFILE="config.mak" | |
285 CONFIG_H="config.h" | |
286 | |
287 ################################################# | |
288 # set default parameters | |
289 ################################################# | |
290 logging="yes" | |
291 logfile="config.log" | |
292 PREFIX="/usr/local" | |
293 bindir='${PREFIX}/bin' | |
294 sysconfdir='${PREFIX}/etc' | |
295 localedir='${PREFIX}/share/locale' | |
296 #dlna="no" | |
297 dlna="yes" | |
298 nls="yes" | |
299 b25="no" | |
300 cc="gcc" | |
301 make="make" | |
302 strip="strip" | |
303 cpu=`uname -m` | |
304 optimize="yes" | |
305 debug="no" | |
306 dostrip="yes" | |
307 extralibs="" | |
308 installstrip="-s" | |
309 cross_compile="no" | |
310 INSTALL="/usr/bin/install -c" | |
311 VERSION="1.1a" | |
312 system_name=`uname -s 2>&1` | |
313 | |
314 ################################################# | |
315 # set cpu variable and specific cpu flags | |
316 ################################################# | |
317 case "$cpu" in | |
318 i386|i486|i586|i686|i86pc|BePC) | |
319 cpu="x86" | |
320 ;; | |
321 x86_64|amd64) | |
322 cpu="x86" | |
323 canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`" | |
324 if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then | |
325 if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then | |
326 cpu="x86_64" | |
327 fi | |
328 fi | |
329 ;; | |
330 # armv4l is a subset of armv5tel | |
331 arm|armv4l|armv5tel) | |
332 cpu="armv4l" | |
333 ;; | |
334 alpha) | |
335 cpu="alpha" | |
336 ;; | |
337 "Power Macintosh"|ppc|ppc64|powerpc) | |
338 cpu="powerpc" | |
339 ;; | |
340 mips|mipsel|IP*) | |
341 cpu="mips" | |
342 ;; | |
343 sun4u|sparc64) | |
344 cpu="sparc64" | |
345 ;; | |
346 sparc) | |
347 cpu="sparc" | |
348 ;; | |
349 sh4) | |
350 cpu="sh4" | |
351 ;; | |
352 parisc|parisc64) | |
353 cpu="parisc" | |
354 ;; | |
355 s390|s390x) | |
356 cpu="s390" | |
357 ;; | |
358 m68k) | |
359 cpu="m68k" | |
360 ;; | |
361 ia64) | |
362 cpu="ia64" | |
363 ;; | |
364 bfin) | |
365 cpu="bfin" | |
366 ;; | |
367 *) | |
368 cpu="unknown" | |
369 ;; | |
370 esac | |
371 | |
372 # OS test booleans functions | |
373 issystem() { | |
374 test "`echo $system_name | tr A-Z a-z`" = "`echo $1 | tr A-Z a-z`" | |
375 } | |
376 | |
377 linux() { issystem "Linux" || issystem "uClinux" ; return "$?" ; } | |
378 sunos() { issystem "SunOS" ; return "$?" ; } | |
379 hpux() { issystem "HP-UX" ; return "$?" ; } | |
380 irix() { issystem "IRIX" ; return "$?" ; } | |
381 aix() { issystem "AIX" ; return "$?" ; } | |
382 cygwin() { issystem "CYGWIN" ; return "$?" ; } | |
383 freebsd() { issystem "FreeBSD" || issystem "GNU/kFreeBSD"; return "$?" ; } | |
384 netbsd() { issystem "NetBSD" ; return "$?" ; } | |
385 bsdos() { issystem "BSD/OS" ; return "$?" ; } | |
386 openbsd() { issystem "OpenBSD" ; return "$?" ; } | |
387 bsd() { freebsd || netbsd || bsdos || openbsd ; return "$?" ; } | |
388 qnx() { issystem "QNX" ; return "$?" ; } | |
389 darwin() { issystem "Darwin" ; return "$?" ; } | |
390 gnu() { issystem "GNU" ; return "$?" ; } | |
391 mingw32() { issystem "MINGW32" ; return "$?" ; } | |
392 morphos() { issystem "MorphOS" ; return "$?" ; } | |
393 amigaos() { issystem "AmigaOS" ; return "$?" ; } | |
394 win32() { cygwin || mingw32 ; return "$?" ; } | |
395 beos() { issystem "BEOS" ; return "$?" ; } | |
396 | |
397 ################################################# | |
398 # check options | |
399 ################################################# | |
400 for opt do | |
401 optval="${opt#*=}" | |
402 case "$opt" in | |
403 --log) | |
404 ;; | |
405 --log=*) logging="$optval" | |
406 ;; | |
407 --prefix=*) PREFIX="$optval"; force_prefix=yes | |
408 ;; | |
409 --bindir=*) bindir="$optval"; | |
410 ;; | |
411 --sysconfdir=*) sysconfdir="$optval"; | |
412 ;; | |
413 --localedir=*) localedir="$optval"; | |
414 ;; | |
415 --with-b25-dir=*) libb25dir="$optval"; | |
416 ;; | |
417 --disable-nls) nls="no" | |
418 ;; | |
419 --enable-dlna) dlna="yes" | |
420 ;; | |
421 --disable-dlna) dlna="no" | |
422 ;; | |
423 --enable-b25) b25="yes" | |
424 ;; | |
425 --disable-b25) b25="no" | |
426 ;; | |
427 --enable-debug) debug="yes" | |
428 ;; | |
429 --disable-debug) debug="no" | |
430 ;; | |
431 --disable-strip) dostrip="no" | |
432 ;; | |
433 --disable-optimize) optimize="no" | |
434 ;; | |
435 --cross-prefix=*) cross_prefix="$optval" | |
436 ;; | |
437 --cross-compile) cross_compile="yes" | |
438 ;; | |
439 --help) show_help | |
440 ;; | |
441 *) | |
442 echo "Unknown option \"$opt\"." | |
443 echo "See $0 --help for available options." | |
444 exit 1 | |
445 ;; | |
446 esac | |
447 done | |
448 | |
449 if [ -n "$cross_prefix" ]; then | |
450 cross_compile="yes" | |
451 cc="${cross_prefix}${cc}" | |
452 strip="${cross_prefix}${strip}" | |
453 else | |
454 [ -n "$CC" ] && cc="$CC" | |
455 [ -n "$STRIP" ] && strip="$STRIP" | |
456 fi | |
457 [ -n "$MAKE" ] && make="$MAKE" | |
458 | |
459 ################################################# | |
460 # create logging file | |
461 ################################################# | |
462 if test "$logging" != no; then | |
463 enabled logging || logfile="$logging" | |
464 echo "# $0 $@" >$logfile | |
465 set >>$logfile | |
466 else | |
467 logfile=/dev/null | |
468 fi | |
469 | |
470 ################################################# | |
139 | 471 # check pt3 driver |
472 ################################################# | |
140 | 473 if test -e pt3/auto_pull ; then |
139 | 474 if ! (cd pt3 && git pull --rebase) ; then |
475 echo "git pull failed, (re)move pt3/auto_pull to disable pulling" | |
476 exit 1 | |
477 fi | |
478 fi | |
479 | |
480 if ! test -e pt3 ; then | |
481 echo "No pt3 checkout, press enter to download one with git or CTRL+C to abort" | |
482 read tmp | |
483 if ! git clone https://github.com/m-tsudo/pt3.git; then | |
484 rm -fr pt3 | |
485 echo "Faild to get a PT3 checkout" | |
486 exit 1; | |
487 fi | |
488 touch pt3/auto_pull | |
489 fi | |
490 | |
491 ################################################# | |
125 | 492 # compiler sanity check |
493 ################################################# | |
494 echolog "Checking for compiler available..." | |
495 check_exec <<EOF | |
496 int main(){ | |
497 return 0; | |
498 } | |
499 EOF | |
500 if test "$?" != 0; then | |
501 echo "$cc is unable to create an executable file." | |
502 if test -z "$cross_prefix" -a "$cross_compile" = no; then | |
503 echo "If $cc is a cross-compiler, use the --cross-compile option." | |
504 fi | |
505 die "C compiler test failed." | |
506 fi | |
507 | |
508 ################################################# | |
509 # check for target specific flags | |
510 ################################################# | |
511 # check for SIMD availability | |
512 | |
513 # AltiVec flags: The FSF version of GCC differs from the Apple version | |
514 if test $cpu = "powerpc"; then | |
515 if test $altivec = "yes"; then | |
516 if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then | |
517 add_cflags "-faltivec" | |
518 else | |
519 add_cflags "-maltivec -mabi=altivec" | |
520 fi | |
521 fi | |
522 fi | |
523 | |
524 check_header altivec.h && _altivec_h=yes || _altivec_h=no | |
525 | |
526 # check if our compiler supports Motorola AltiVec C API | |
527 if enabled altivec; then | |
528 if enabled _altivec_h; then | |
529 inc_altivec_h="#include <altivec.h>" | |
530 else | |
531 inc_altivec_h= | |
532 fi | |
533 check_cc <<EOF || altivec=no | |
534 $inc_altivec_h | |
535 int main(void) { | |
536 vector signed int v1, v2, v3; | |
537 v1 = vec_add(v2,v3); | |
538 return 0; | |
539 } | |
540 EOF | |
541 fi | |
542 | |
543 # mmi only available on mips | |
544 if [ "$mmi" = "default" ]; then | |
545 if [ "$cpu" = "mips" ]; then | |
546 mmi="yes" | |
547 else | |
548 mmi="no" | |
549 fi | |
550 fi | |
551 | |
552 # check if our compiler supports mmi | |
553 enabled mmi && check_cc <<EOF || mmi="no" | |
554 int main(void) { | |
555 __asm__ ("lq \$2, 0(\$2)"); | |
556 return 0; | |
557 } | |
558 EOF | |
559 | |
560 # test gcc version to see if vector builtins can be used | |
561 # currently only used on i386 for MMX builtins | |
562 check_cc -msse <<EOF && builtin_vector=yes || builtin_vector=no | |
563 #include <xmmintrin.h> | |
564 int main(void) { | |
565 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) | |
566 return 0; | |
567 #else | |
568 #error no vector builtins | |
569 #endif | |
570 } | |
571 EOF | |
572 | |
573 # test for mm3dnow.h | |
574 test "$cpu" = "x86_64" && march=k8 || march=athlon | |
575 check_cc -march=$march <<EOF && mm3dnow=yes || mm3dnow=no | |
576 #include <mm3dnow.h> | |
577 int main(void) { | |
578 __m64 b1; | |
579 b1 = _m_pswapd(b1); | |
580 _m_femms(); | |
581 return 0; | |
582 } | |
583 EOF | |
584 | |
585 # --- | |
586 # big/little-endian test | |
587 if test "$cross_compile" = "no"; then | |
588 check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes" | |
589 #include <inttypes.h> | |
590 int main(int argc, char ** argv){ | |
591 volatile uint32_t i=0x01234567; | |
592 return (*((uint8_t*)(&i))) == 0x67; | |
593 } | |
594 EOF | |
595 else | |
596 # programs cannot be launched if cross compiling, so make a static guess | |
597 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then | |
598 bigendian="yes" | |
599 fi | |
600 fi | |
601 | |
602 # add some useful compiler flags if supported | |
603 add_cflags -I.. | |
604 add_cflags -I../driver | |
605 check_cflags -W | |
606 check_cflags -Wall | |
607 check_cflags -D_LARGEFILE_SOURCE | |
608 check_cflags -D_FILE_OFFSET_BITS=64 | |
609 check_cflags -D_REENTRANT | |
610 linux && add_cflags -D_GNU_SOURCE | |
611 | |
612 ################################################# | |
613 # check for debug symbols | |
614 ################################################# | |
615 if enabled debug; then | |
616 add_cflags -g3 | |
617 add_cflags -DHAVE_DEBUG | |
618 dostrip=no | |
619 fi | |
620 | |
621 if enabled optimize; then | |
622 if test -n "`$cc -v 2>&1 | grep xlc`"; then | |
623 add_cflags "-O5" | |
624 add_ldflags "-O5" | |
625 else | |
626 add_cflags "-O3" | |
627 fi | |
628 fi | |
629 | |
630 ################################################# | |
631 # check for locales (optional) | |
632 ################################################# | |
633 echolog "Checking for locales ..." | |
634 check_header locale.h && add_cflags -DHAVE_LOCALE_H | |
635 check_lib locale.h setlocale "" && add_cflags -DHAVE_SETLOCALE | |
636 | |
637 ################################################# | |
638 # check for ifaddr (optional) | |
639 ################################################# | |
640 echolog "Checking for ifaddrs ..." | |
641 check_lib ifaddrs.h getifaddrs "" && add_cflags -DHAVE_IFADDRS_H | |
642 | |
643 ################################################# | |
644 # check for langinfo (optional) | |
645 ################################################# | |
646 echolog "Checking for langinfo ..." | |
647 check_header langinfo.h && add_cflags -DHAVE_LANGINFO_H | |
648 check_lib langinfo.h nl_langinfo "" && add_cflags -DHAVE_LANGINFO_CODESET | |
649 | |
650 ################################################# | |
651 # check for iconv (optional) | |
652 ################################################# | |
653 echolog "Checking for iconv ..." | |
654 check_lib iconv.h iconv "" && add_cflags -DHAVE_ICONV | |
655 | |
656 ################################################# | |
657 # check for libarib25 (mandatory if enabled) | |
658 ################################################# | |
659 if test "$b25" = "yes"; then | |
660 b25_min_version="0.1.8" | |
661 echolog "Checking for b25 >= $b25_min_version ..." | |
662 if [ -n "$libb25dir" ]; then | |
663 check_cflags -I$libb25dir/include/arib25 | |
664 check_ldflags -L$libb25dir/lib | |
665 fi | |
666 check_lib arib_std_b25.h create_arib_std_b25 -larib25 -lpcsclite || die "Error, can't find libarib25 (install it or use --disable-b25) !" | |
667 # check_lib_version libarib25 $libb25_min_version || die "Error, libb25 < $libb25_min_version !" | |
668 add_cflags -DHAVE_LIBARIB25 | |
669 add_cflags `pkg-config libarib25 pcsclite --cflags` | |
670 add_extralibs `pkg-config libarib25 pcsclite --libs` | |
671 fi | |
672 | |
136
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
673 ################################################# |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
674 # check for libdlna |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
675 ################################################# |
129
4f6d9621ee00
add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
128
diff
changeset
|
676 # force use DLNA |
136
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
677 if test "$dlna" = "yes"; then |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
678 add_cflags -DHAVE_DLNA |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
679 add_cflags `pkg-config libupnp --cflags` |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
680 add_cflags `pkg-config libdlna --cflags` |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
681 |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
682 add_extralibs `pkg-config libupnp --libs` |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
683 add_extralibs `pkg-config libdlna --libs` |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
684 add_extralibs -lrt |
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
685 fi |
129
4f6d9621ee00
add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
128
diff
changeset
|
686 |
125 | 687 ################################################# |
688 # logging result | |
689 ################################################# | |
690 echolog "" | |
691 echolog "recpt1: configure is OK" | |
692 echolog " version $VERSION" | |
693 test $b25 = yes && echolog " using libb25 `pkg-config libb25 --modversion`" | |
694 echolog "configuration:" | |
695 echolog " install prefix $PREFIX" | |
696 echolog " configuration dir $sysconfdir" | |
697 echolog " locales dir $localedir" | |
698 echolog " NLS support $nls" | |
699 echolog " B25 support $b25" | |
136
2a9ac5ce2c7e
Remove internal libdlna and libupnp.(using OS package by default)
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
129
diff
changeset
|
700 echolog " DLNA support $dlna" |
125 | 701 echolog " C compiler $cc" |
702 echolog " STRIP $strip" | |
703 echolog " make $make" | |
704 echolog " CPU $cpu ($tune)" | |
705 echolog " debug symbols $debug" | |
706 echolog " strip symbols $dostrip" | |
707 echolog " optimize $optimize" | |
708 echolog "" | |
709 echolog " CFLAGS $CFLAGS" | |
710 echolog " LDFLAGS $LDFLAGS" | |
711 echolog " extralibs $extralibs" | |
712 echolog "" | |
713 | |
714 ################################################# | |
715 # save configs attributes | |
716 ################################################# | |
717 echolog "Creating $CONFIGFILE ..." | |
718 | |
719 echo "# Automatically generated by configure - do not modify!" > $CONFIGFILE | |
720 | |
721 append_config "VERSION=$VERSION" | |
722 | |
723 append_config "PREFIX=$PREFIX" | |
724 append_config "prefix=\$(DESTDIR)\$(PREFIX)" | |
725 append_config "bindir=\$(DESTDIR)$bindir" | |
726 append_config "sysconfdir=\$(DESTDIR)$sysconfdir" | |
727 append_config "localedir=\$(DESTDIR)$localedir" | |
728 | |
729 append_config "MAKE=$make" | |
730 append_config "CC=$cc" | |
731 append_config "LN=ln" | |
732 if enabled dostrip; then | |
733 append_config "STRIP=$strip" | |
734 append_config "INSTALLSTRIP=$installstrip" | |
735 else | |
736 append_config "STRIP=echo ignoring strip" | |
737 append_config "INSTALLSTRIP=" | |
738 fi | |
739 append_config "EXTRALIBS=$extralibs" | |
740 | |
741 append_config "OPTFLAGS=$CFLAGS" | |
742 append_config "LDFLAGS=$LDFLAGS" | |
743 append_config "INSTALL=$INSTALL" | |
744 | |
745 append_config "DEBUG=$debug" | |
746 | |
747 | |
748 echolog "Creating $CONFIG_H ..." | |
749 echo "/* Automatically generated by configure - do not modify! */" > $CONFIG_H | |
750 add_clog_str VERSION "$VERSION" | |
751 add_clog_str PACKAGE "recpt1" | |
752 add_clog_str PACKAGE_NAME "recpt1" | |
753 add_clog_str SYSCONFDIR `expand_var "${sysconfdir}"` | |
754 add_clog_str LOCALEDIR `expand_var "${localedir}"` | |
755 test $nls = yes && add_clog CONFIG_NLS 1 | |
756 | |
757 clean | |
758 exit 0 |