summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-29 07:07:12 +0000
committerbertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-29 07:07:12 +0000
commita7d15a362bdf63558a5e2359dc9915439350267c (patch)
tree59d5739a885050ee4ac9ba3bda21aeb7a3e1fc80 /configure
parentd4f7c077431daf10f1789f5e0fc96aaa0b973960 (diff)
downloadmpv-a7d15a362bdf63558a5e2359dc9915439350267c.tar.bz2
mpv-a7d15a362bdf63558a5e2359dc9915439350267c.tar.xz
inet_aton fallback support by Joey Parrish <joey@yunamusic.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7136 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure33
1 files changed, 31 insertions, 2 deletions
diff --git a/configure b/configure
index e9e1554789..64a9d41b67 100755
--- a/configure
+++ b/configure
@@ -1553,6 +1553,7 @@ else
fi
+_use_aton=no
echocheck "inet_pton()"
cat > $TMPC << EOF
#include <sys/types.h>
@@ -1569,10 +1570,35 @@ elif cc_check $_ld_sock -lresolv ; then
_ld_sock="$_ld_sock -lresolv"
echores "yes (using $_ld_sock)"
else
- echores "no (=> streaming support disabled)"
- _streaming=no
+ echores "no (=> i'll try inet_aton next)"
+
+ echocheck "inet_aton()"
+ cat > $TMPC << EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+int main(void) { (void) inet_aton(0, 0); return 0; }
+EOF
+ _use_aton=yes
+ if cc_check $_ld_sock ; then
+ # NOTE: Linux has libresolv but does not need it
+ :
+ echores "yes (using $_ld_sock)"
+ elif cc_check $_ld_sock -lresolv ; then
+ # NOTE: needed for SunOS at least
+ _ld_sock="$_ld_sock -lresolv"
+ echores "yes (using $_ld_sock)"
+ else
+ _use_aton=no
+ _streaming=no
+ echores "no (=> streaming support disabled)"
+ fi
fi
+_def_use_aton='#undef USE_ATON'
+if test "$_use_aton" != no; then
+ _def_use_aton='#define USE_ATON 1'
+fi
echocheck "inttypes.h (required)"
cat > $TMPC << EOF
@@ -4653,6 +4679,9 @@ $_def_faad
/* enable streaming */
$_def_streaming
+/* define this to use inet_aton() instead of inet_pton() */
+$_def_use_aton
+
/* enables / disables cdparanoia support */
$_def_cdparanoia