ref: 37b0d036fa2dabf8659f99ed03a3151e39c14364
parent: ebb633a4d833cd4c10ae2e301610e69a9e4a0236
author: cbagwell <cbagwell>
date: Sat Jul 10 18:01:01 EDT 1999
Last gsm update for a while
--- a/configure
+++ b/configure
@@ -1253,10 +1253,56 @@
fi
-if test "$gsmlib" = auto
+if test "$gsmlib" != auto && test "$gsmlib" != no
then
+ LIBS="$LIBS -L$gsmlib"
+fi
+
+if test "$gsminc" != auto && test "$gsminc" != no
+then
+ CFLAGS="$CFLAGS -I$gsminc"
+fi
+
+ac_safe=`echo "gsm.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gsm.h""... $ac_c" 1>&6
+echo "configure:1269: checking for gsm.h" >&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 1274 "configure"
+#include "confdefs.h"
+#include <gsm.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1279: \"$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
+ gsminc=yes
+else
+ echo "$ac_t""no" 1>&6
+gsminc=no
+fi
+
+if test "$gsminc" != yes
+then
+ echo "configure: warning: Can not find gsm.h header file" 1>&2
+else
echo $ac_n "checking for gsm_create in -lgsm""... $ac_c" 1>&6
-echo "configure:1260: checking for gsm_create in -lgsm" >&5
+echo "configure:1306: 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
@@ -1264,7 +1310,7 @@
ac_save_LIBS="$LIBS"
LIBS="-lgsm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1268 "configure"
+#line 1314 "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
@@ -1275,7 +1321,7 @@
gsm_create()
; return 0; }
EOF
-if { (eval echo configure:1279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1325: \"$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
@@ -1302,40 +1348,24 @@
echo "$ac_t""no" 1>&6
fi
- if test "$ac_cv_lib_gsm_gsm_create" = yes
- then
- gsmlib=yes
- fi
-else
- if test "$gsmlib" != no
- then
- LIBS="$LIBS -L$gsmlib -lgsm"
- CFLAGS="$CFLAGS -DHAVE_LIBGSM"
- gsmlib=yes
- fi
fi
-if test "$gsminc" != auto && "$gsminc" != no
-then
- CFLAGS="$CFLAGS -I$gsminc"
-fi
-
for ac_hdr in getopt.h unistd.h malloc.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1329: checking for $ac_hdr" >&5
+echo "configure:1359: 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 1334 "configure"
+#line 1364 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1369: \"$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*
@@ -1366,17 +1396,17 @@
then
ac_safe=`echo "gsm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gsm.h""... $ac_c" 1>&6
-echo "configure:1370: checking for gsm.h" >&5
+echo "configure:1400: checking for gsm.h" >&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 1375 "configure"
+#line 1405 "configure"
#include "confdefs.h"
#include <gsm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1410: \"$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*
@@ -1408,12 +1438,12 @@
for ac_func in getopt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1412: checking for $ac_func" >&5
+echo "configure:1442: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1417 "configure"
+#line 1447 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1436,7 +1466,7 @@
; return 0; }
EOF
-if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1464,12 +1494,12 @@
for ac_func in strerror memmove
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_func" >&5
+echo "configure:1498: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1473 "configure"
+#line 1503 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1492,7 +1522,7 @@
; return 0; }
EOF
-if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1521,7 +1551,7 @@
if test "$alsa_dsp" = auto
then
echo $ac_n "checking whether /dev/snd/pcm00 is functional (ALSA)""... $ac_c" 1>&6
-echo "configure:1525: checking whether /dev/snd/pcm00 is functional (ALSA)" >&5
+echo "configure:1555: checking whether /dev/snd/pcm00 is functional (ALSA)" >&5
if eval "test \"`echo '$''{'ac_cv_dev_alsa_dsp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1529,7 +1559,7 @@
ac_cv_dev_alsa_dsp=no
else
cat > conftest.$ac_ext <<EOF
-#line 1533 "configure"
+#line 1563 "configure"
#include "confdefs.h"
int
@@ -1545,7 +1575,7 @@
}
EOF
-if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_dev_alsa_dsp=yes
else
@@ -1577,7 +1607,7 @@
if test "$oss_dsp" = auto
then
echo $ac_n "checking whether /dev/dsp is functional (OSS)""... $ac_c" 1>&6
-echo "configure:1581: checking whether /dev/dsp is functional (OSS)" >&5
+echo "configure:1611: checking whether /dev/dsp is functional (OSS)" >&5
if eval "test \"`echo '$''{'ac_cv_dev_oss_dsp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1585,7 +1615,7 @@
ac_cv_dev_oss_dsp=no
else
cat > conftest.$ac_ext <<EOF
-#line 1589 "configure"
+#line 1619 "configure"
#include "confdefs.h"
int
@@ -1601,7 +1631,7 @@
}
EOF
-if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_dev_oss_dsp=yes
else
@@ -1623,17 +1653,17 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1627: checking for $ac_hdr" >&5
+echo "configure:1657: 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 1632 "configure"
+#line 1662 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1667: \"$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*
@@ -1675,7 +1705,7 @@
if test "$sun_audio" = auto
then
echo $ac_n "checking whether /dev/audio is functional (SUN style)""... $ac_c" 1>&6
-echo "configure:1679: checking whether /dev/audio is functional (SUN style)" >&5
+echo "configure:1709: checking whether /dev/audio is functional (SUN style)" >&5
if eval "test \"`echo '$''{'ac_cv_dev_sun_audio'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1683,7 +1713,7 @@
ac_cv_dev_sun_audio=no
else
cat > conftest.$ac_ext <<EOF
-#line 1687 "configure"
+#line 1717 "configure"
#include "confdefs.h"
int
@@ -1699,7 +1729,7 @@
}
EOF
-if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_dev_sun_audio=yes
else
@@ -1719,17 +1749,17 @@
then
ac_safe=`echo "sys/audioio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/audioio.h""... $ac_c" 1>&6
-echo "configure:1723: checking for sys/audioio.h" >&5
+echo "configure:1753: checking for sys/audioio.h" >&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 1728 "configure"
+#line 1758 "configure"
#include "confdefs.h"
#include <sys/audioio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1763: \"$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*
@@ -1752,17 +1782,17 @@
ac_safe=`echo "sun/audioio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sun/audioio.h""... $ac_c" 1>&6
-echo "configure:1756: checking for sun/audioio.h" >&5
+echo "configure:1786: checking for sun/audioio.h" >&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 1761 "configure"
+#line 1791 "configure"
#include "confdefs.h"
#include <sun/audioio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1796: \"$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*
--- a/configure.in
+++ b/configure.in
@@ -104,25 +104,22 @@
dnl Test for GSM library.
-if test "$gsmlib" = auto
+if test "$gsmlib" != auto && test "$gsmlib" != no
then
- AC_CHECK_LIB(gsm, gsm_create)
- if test "$ac_cv_lib_gsm_gsm_create" = yes
- then
- gsmlib=yes
- fi
-else
- if test "$gsmlib" != no
- then
- LIBS="$LIBS -L$gsmlib -lgsm"
- CFLAGS="$CFLAGS -DHAVE_LIBGSM"
- gsmlib=yes
- fi
+ LIBS="$LIBS -L$gsmlib"
fi
-if test "$gsminc" != auto && "$gsminc" != no
+if test "$gsminc" != auto && test "$gsminc" != no
then
CFLAGS="$CFLAGS -I$gsminc"
+fi
+
+AC_CHECK_HEADER(gsm.h, gsminc=yes, gsminc=no)
+if test "$gsminc" != yes
+then
+ AC_WARN([Can not find gsm.h header file])
+else
+ AC_CHECK_LIB(gsm, gsm_create)
fi
dnl Checks for header files.