pkgsrc/mbone/vat/patches/patch-ao

467 lines
12 KiB
Text

$NetBSD: patch-ao,v 1.1 2002/10/02 22:57:15 wiz Exp $
--- configure.orig Thu May 16 10:03:58 1996
+++ configure
@@ -1468,6 +1664,8 @@ else
d=""
fi
+tcldir=tcl8.3
+tcllib=tcl83
if test "$d" != "" ; then
if test ! -d $d ; then
echo "'$d' is not a directory"
@@ -1478,8 +1676,8 @@ if test "$d" != "" ; then
echo "can't find tcl.h in $d/include"
exit 1
fi
- places="$d/lib/libtcl7.5.so \
- $d/lib/libtcl7.5.a \
+ places="$d/lib/lib${tcllib}.so \
+ $d/lib/lib${tcllib}.a \
$d/lib/libtcl.so \
$d/lib/libtcl.a"
V_LIB_TCL=FAIL
@@ -1493,7 +1691,7 @@ if test "$d" != "" ; then
echo "can't find libtcl.a in $d/lib"
exit 1
fi
- places="$d/lib/tcl7.5 \
+ places="$d/lib/${tcldir} \
$d/lib/tcl"
V_LIBRARY_TCL=FAIL
for dir in $places; do
@@ -1513,23 +1711,26 @@ else
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
V_INCLUDE_TCL=""
else
echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
rm -rf conftest*
V_INCLUDE_TCL=FAIL
fi
rm -f conftest*
if test "$V_INCLUDE_TCL" = FAIL; then
echo "checking for tcl.h"
- places="$PWD/../tcl7.5 \
- /usr/src/local/tcl7.5 \
- /import/tcl/include/tcl7.5 \
+ places="$PWD/../${tcldir} \
+ /usr/src/local/${tcldir} \
+ /import/tcl/include/${tcldir} \
$prefix/include \
+ $prefix/include/${tcldir} \
$x_includes/tk \
$x_includes \
/usr/local/include \
@@ -1546,81 +1747,43 @@ rm -f conftest*
exit 1
fi
fi
- echo $ac_n "checking for -ltcl7.5""... $ac_c" 1>&6
-ac_lib_var=`echo tcl7.5'_'main | tr './+\055' '__p_'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltcl7.5 $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1558 "configure"
-#include "confdefs.h"
-
-int main() { return 0; }
-int t() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:1566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- V_LIB_TCL="-ltcl7.5"
-else
- echo "$ac_t""no" 1>&6
-V_LIB_TCL="FAIL"
-fi
-
- if test "$V_LIB_TCL" = FAIL; then
- echo "checking for libtcl.a"
- places="\
- $prefix/lib \
- $x_libraries \
- /usr/contrib/lib \
- /usr/local/lib \
- /usr/lib \
- $PWD/../tcl7.5 \
- /usr/src/local/tcl7.5 \
- /import/tcl/lib/tcl7.5 \
- "
- for dir in $places; do
- if test -r $dir/libtcl7.5.so -o -r $dir/libtcl7.5.a; then
- V_LIB_TCL="-L$dir -ltcl7.5"
- break
- fi
- if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then
- V_LIB_TCL="-L$dir -ltcl"
- break
- fi
- done
- if test "$V_LIB_TCL" = FAIL; then
- echo "can't find libtcl.a"
- exit 1
- else
- if test $solaris ; then
- V_LIB_TCL="-R$dir $V_LIB_TCL"
- fi
+ V_TCL_CONFIG=FAIL
+ echo "checking for tclConfig.sh"
+ places="/usr/local/lib/${tcldir} \
+ /usr/contrib/lib/${tcldir} \
+ /usr/lib/${tcldir} \
+ /usr/lib/tk/${tcldir} \
+ /import/tcl/lib/${tcldir} \
+ $prefix/lib/${tcldir} \
+ $x_libraries/${tcldir} \
+ /usr/local/lib/tcl \
+ /usr/lib/tcl \
+ /usr/lib/tk/tcl \
+ /import/tcl/lib/tcl \
+ $prefix/lib/tcl \
+ $x_libraries/tcl \
+ $x_libraries/tcl"
+ for dir in $places; do
+ if test -r $dir/tclConfig.sh ; then
+ V_TCL_CONFIG=$dir/tclConfig.sh
+ break
fi
+ done
+ if test "$V_TCL_CONFIG" = FAIL; then
+ echo "can't find tclConfig.sh"
+ exit 1
fi
+ . ${V_TCL_CONFIG}
+ V_LIB_TCL="${TCL_LIB_FLAG}"
echo "checking for tcl/init.tcl"
V_LIBRARY_TCL=FAIL
- places="/usr/local/lib/tcl7.5 \
- /usr/contrib/lib/tcl7.5 \
- /usr/lib/tcl7.5 \
- /usr/lib/tk/tcl7.5 \
- /import/tcl/lib/tcl7.5 \
- $prefix/lib/tcl7.5 \
- $x_libraries/tcl7.5 \
+ places="/usr/local/lib/${tcldir} \
+ /usr/contrib/lib/${tcldir} \
+ /usr/lib/${tcldir} \
+ /usr/lib/tk/${tcldir} \
+ /import/tcl/lib/${tcldir} \
+ $prefix/lib/${tcldir} \
+ $x_libraries/${tcldir} \
/usr/local/lib/tcl \
/usr/lib/tcl \
/usr/lib/tk/tcl \
@@ -1651,6 +1814,8 @@ else
d=""
fi
+tkdir=tk8.3
+tklib=tk83
if test "$d" != "" ; then
if test ! -d $d ; then
echo "'$d' is not a directory"
@@ -1661,8 +1826,8 @@ if test "$d" != "" ; then
echo "can't find tk.h in $d/include"
exit 1
fi
- places="$d/lib/libtk4.1.so \
- $d/lib/libtk4.1.a \
+ places="$d/lib/lib${tklib}.so \
+ $d/lib/lib${tklib}.a \
$d/lib/libtk.so \
$d/lib/libtk.a"
V_LIB_TK=FAIL
@@ -1676,7 +1841,7 @@ if test "$d" != "" ; then
echo "can't find libtk.a in $d/lib"
exit 1
fi
- places="$d/lib/tk4.1 \
+ places="$d/lib/${tkdir} \
$d/lib/tk"
V_LIBRARY_TK=FAIL
for dir in $places; do
@@ -1712,15 +1879,16 @@ rm -f conftest*
V_INCLUDE_TK=""
places="\
$prefix/include \
+ $prefix/include/${tkdir} \
/usr/local/include \
/usr/contrib/include \
/usr/include/tcl \
/usr/include\
$x_includes/tk \
$x_includes \
- $PWD/../tk4.1 \
- /usr/src/local/tk4.1 \
- /import/tcl/include/tk4.1 \
+ $PWD/../${tkdir} \
+ /usr/src/local/${tkdir} \
+ /import/tcl/include/${tkdir} \
"
for dir in $places; do
if test -r $dir/tk.h ; then
@@ -1733,82 +1901,47 @@ rm -f conftest*
exit 1
fi
fi
- echo $ac_n "checking for -ltk4.1""... $ac_c" 1>&6
-ac_lib_var=`echo tk4.1'_'main | tr './+\055' '__p_'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
-LIBS="-ltk4.1 $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1745 "configure"
-#include "confdefs.h"
-
-int main() { return 0; }
-int t() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- V_LIB_TK="-ltk4.1"
-else
- echo "$ac_t""no" 1>&6
-V_LIB_TK="FAIL"
-fi
-
- if test "$V_LIB_TK" = FAIL; then
- echo "checking for libtk.a"
- places="/usr/local/lib \
- /usr/contrib/lib \
- /usr/lib \
- /usr/lib/tk \
- /import/tcl/lib \
- $PWD/../tk4.1 \
- /usr/src/local/tk4.1 \
- $prefix/lib \
- $x_libraries"
- for dir in $places; do
- if test -r $dir/libtk4.1.so -o -r $dir/libtk4.1.a; then
- V_LIB_TK="-L$dir -ltk4.1"
- break
- fi
- if test -r $dir/libtk.so -o -r $dir/libtk.a; then
- V_LIB_TK="-L$dir -ltk"
- break
- fi
- done
- if test "$V_LIB_TK" = FAIL; then
- echo "can't find libtk.a"
- exit 1
- else
- if test $solaris ; then
- V_LIB_TK="-R$dir $V_LIB_TK"
- fi
+ V_TK_CONFIG=FAIL
+ echo "checking for tkConfig.sh"
+ places="/usr/local/lib/${tkdir} \
+ /usr/contrib/lib/${tkdir} \
+ /usr/lib/${tkdir} \
+ /usr/lib/tk/${tkdir} \
+ /import/tcl/lib/${tkdir} \
+ $prefix/lib/${tkdir} \
+ $x_libraries/${tkdir} \
+ $PWD/../${tkdir}/library \
+ /usr/src/local/${tkdir}/library \
+ /usr/local/lib/tk \
+ /usr/lib/tk \
+ /usr/lib/tk/tk \
+ /import/tcl/lib/tk \
+ $prefix/lib/tk \
+ $x_libraries/tk \
+ $x_libraries/tk"
+ for dir in $places; do
+ if test -r $dir/tkConfig.sh ; then
+ V_TK_CONFIG=$dir/tkConfig.sh
+ break
fi
+ done
+ if test "$V_TK_CONFIG" = FAIL; then
+ echo "can't find tkConfig.sh"
+ exit 1
fi
+ . ${V_TK_CONFIG}
+ V_LIB_TK="${TK_LIB_FLAG}"
echo "checking for tk/tk.tcl"
V_LIBRARY_TK=FAIL
- places="/usr/local/lib/tk4.1 \
- /usr/contrib/lib/tk4.1 \
- /usr/lib/tk4.1 \
- /usr/lib/tk/tk4.1 \
- /import/tcl/lib/tk4.1 \
- $prefix/lib/tk4.1 \
- $x_libraries/tk4.1 \
- $PWD/../tk4.1/library \
- /usr/src/local/tk4.1/library \
+ places="/usr/local/lib/${tkdir} \
+ /usr/contrib/lib/${tkdir} \
+ /usr/lib/${tkdir} \
+ /usr/lib/tk/${tkdir} \
+ /import/tcl/lib/${tkdir} \
+ $prefix/lib/${tkdir} \
+ $x_libraries/${tkdir} \
+ $PWD/../${tkdir}/library \
+ /usr/src/local/${tkdir}/library \
/usr/local/lib/tk \
/usr/lib/tk \
/usr/lib/tk/tk \
@@ -1872,22 +2005,93 @@ if test "$d" != "" ; then
exit 1
fi
else
- echo "checking for libgsm.a"
+ echo "checking for -lgsm"
V_LIB_GSM=FAIL
- places="$PWD/../gsm-1.0-pl7 \
- $PWD/../gsm-1.0 \
- $PWD/../gsm \
- /usr/src/local/gsm-1.0-pl7 \
- /usr/src/local/gsm-1.0 \
- /usr/src/local/gsm"
- for dir in $places; do
- if test -r $dir/lib/libgsm.a -a -r $dir/inc/private.h ; then
- V_LIB_GSM=$dir/lib/libgsm.a
- V_INCLUDE_GSM=-I$dir/inc
- break
- fi
- done
- if test "$V_LIB_GSM" = FAIL; then
+ V_INCLUDE_GSM=FAIL
+ echo $ac_n "checking for gsm_create in -lgsm""... $ac_c" 1>&6
+echo "configure:2013: checking for gsm_create in -lgsm" >&5
+ac_lib_var=`echo gsm'_'gsm_create | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lgsm $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2021 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gsm_create();
+
+int main() {
+gsm_create()
+; return 0; }
+EOF
+if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ V_LIB_GSM="-lgsm"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ for ac_hdr in private.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2056: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2061 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ if test "$ac_cv_header_private_h" = "yes"; then
+ V_INCLUDE_GSM=
+ fi
+ if test "$V_LIB_GSM" = FAIL || test "$V_INCLUDES_GSM" = FAIL ; then
echo "configure: can't find gsm library ... you can get it at"
echo " http://www.cs.tu-berlin.de/~jutta/toast.html"
exit 1
@@ -2040,7 +2251,9 @@ sparc-sun-sunos*)
;;
*-*-netbsd*)
V_TARCMD="tar -h -c -f"
- V_LIB="$V_LIB -L/usr/local/lib"
+ V_LIB="${LDFLAGS} $V_LIB -lossaudio"
+ V_OBJ_AUDIO="audio-voxware.o"
+ V_CCOPT="${CPPFLAGS}"
;;
*-*-hpux*)
V_DEFINE="$V_DEFINE"