BSDI needs to test for libgnugetopt. Patch from Steven Schultz

This commit is contained in:
rocky
2005-10-16 22:21:13 +00:00
parent 1e89dc8909
commit 91ed647a6b
3 changed files with 18 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ define(RELEASE_NUM, 77)
define(CDIO_VERSION_STR, 0.$1cvs) define(CDIO_VERSION_STR, 0.$1cvs)
AC_PREREQ(2.52) AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.173 2005/10/05 09:48:11 rocky Exp $])dnl AC_REVISION([$Id: configure.ac,v 1.174 2005/10/16 22:21:13 rocky Exp $])dnl
AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM)) AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
AC_CONFIG_SRCDIR(src/cd-info.c) AC_CONFIG_SRCDIR(src/cd-info.c)
@@ -166,6 +166,16 @@ dnl FreeBSD 4 has getopt in unistd.h. So we include that before
dnl getopt.h dnl getopt.h
AC_CHECK_HEADERS(unistd.h getopt.h) AC_CHECK_HEADERS(unistd.h getopt.h)
AC_CHECK_FUNC(getopt_long,
[AC_DEFINE(HAVE_GETOPT_LONG, 1, [long getopt support])],
[ # Some BSD (BSD/OS) have a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt], [getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG, 1,
[long getopt support])
LIBGETOPT_LIB="-lgnugetopt"])
])
AC_SUBST(LIBGETOPT_LIB)
AC_SUBST(SBPCD_H) AC_SUBST(SBPCD_H)
AC_SUBST(UCDROM_H) AC_SUBST(UCDROM_H)
AC_SUBST(TYPESIZES) AC_SUBST(TYPESIZES)

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.38 2005/10/06 12:57:39 rocky Exp $ # $Id: Makefile.am,v 1.39 2005/10/16 22:21:14 rocky Exp $
# #
# Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com> # Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
# #
@@ -46,7 +46,7 @@ endif
if BUILD_CD_DRIVE if BUILD_CD_DRIVE
cd_drive_SOURCES = cd-drive.c util.c util.h cd_drive_SOURCES = cd-drive.c util.c util.h
cd_drive_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) cd_drive_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) @LIBGETOPT_LIB@
bin_cd_drive = cd-drive bin_cd_drive = cd-drive
endif endif
@@ -64,19 +64,19 @@ endif
if BUILD_CD_READ if BUILD_CD_READ
cd_read_SOURCES = cd-read.c util.c util.h cd_read_SOURCES = cd-read.c util.c util.h
cd_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) cd_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) @LIBGETOPT_LIB@
bin_cd_read = cd-read bin_cd_read = cd-read
endif endif
if BUILD_ISO_INFO if BUILD_ISO_INFO
iso_info_SOURCES = iso-info.c util.c util.h iso_info_SOURCES = iso-info.c util.c util.h
iso_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) iso_info_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) @LIBGETOPT_LIB@
bin_iso_info = iso-info bin_iso_info = iso-info
endif endif
if BUILD_ISO_READ if BUILD_ISO_READ
iso_read_SOURCES = iso-read.c util.c util.h iso_read_SOURCES = iso-read.c util.c util.h
iso_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) iso_read_LDADD = $(LIBISO9660_LIBS) $(LIBCDIO_LIBS) $(LIBICONV) @LIBGETOPT_LIB@
bin_iso_read = iso-read bin_iso_read = iso-read
endif endif

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.16 2005/10/05 09:48:12 rocky Exp $ # $Id: Makefile.am,v 1.17 2005/10/16 22:21:14 rocky Exp $
# #
# Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com> # Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
# Copyright (C) 1998 Monty xiphmont@mit.edu # Copyright (C) 1998 Monty xiphmont@mit.edu
@@ -35,7 +35,7 @@ cd_paranoia_SOURCES = cd-paranoia.c \
buffering_write.c buffering_write.h \ buffering_write.c buffering_write.h \
$(getopt_sources) header.c report.c usage.h utils.h version.h $(getopt_sources) header.c report.c usage.h utils.h version.h
cd_paranoia_LDADD = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) cd_paranoia_LDADD = $(LIBCDIO_LIBS) $(LIBCDIO_CDDA_LIBS) $(LIBCDIO_PARANOIA_LIBS) @LIBGETOPT_LIB@
bin_PROGRAMS = cd-paranoia bin_PROGRAMS = cd-paranoia