Commit 6f6fb470 authored by jsquyres's avatar jsquyres

Some systems need -lsocket -lnsl to call functions like connect(),

gethostbyname(), etc.  Added a configure test to check for these
libraries.  If they are found, put them in the shell variable
SOCKET_LIBS.  Otherwise, SOCKET_LIBS will be empty.

AC_SUBST the SOCKET_LIBS variable/macro.

ogg123/Makefile.am adds @SOCKET_LIBS@ to the ogg123_LDADD line so that
they will be linked in properly.

svn path=/trunk/vorbis-tools/; revision=1318
parent 5ff3b62e
......@@ -59,6 +59,9 @@ dnl --------------------------------------------------
AM_PATH_OGG(,AC_MSG_ERROR(Ogg needed!))
AM_PATH_VORBIS(,AC_MSG_ERROR(Vorbis needed!))
AM_PATH_AO(,AC_MSG_ERROR(libao needed!))
SOCKET_LIBS=
AC_CHECK_LIB(socket, socket, SOCKET_LIBS="-lsocket")
AC_CHECK_LIB(nsl, gethostbyname, SOCKET_LIBS="-lnsl $SOCKET_LIBS")
dnl --------------------------------------------------
dnl Check for library functions
......@@ -72,5 +75,6 @@ dnl --------------------------------------------------
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
AC_SUBST(SOCKET_LIBS)
AC_OUTPUT(Makefile oggenc/Makefile oggenc/man/Makefile ogg123/Makefile vorbiscomment/Makefile debian/Makefile)
......@@ -10,7 +10,8 @@ man_MANS = ogg123.1
INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@
ogg123_LDADD = @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@
ogg123_LDADD = @VORBISFILE_LIBS@ @VORBIS_LIBS@ @OGG_LIBS@ @AO_LIBS@ \
@SOCKET_LIBS@
ogg123_SOURCES = ogg123.c ao_interface.c buffer.c ogg123.h buffer.h getopt.c getopt1.c getopt.h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment