diff --git a/configure.ac b/configure.ac index 1df7a8a9..9c1e6a1f 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ define(RELEASE_NUM, 77) define(CDIO_VERSION_STR, 0.$1cvs) 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_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 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(UCDROM_H) AC_SUBST(TYPESIZES) diff --git a/src/Makefile.am b/src/Makefile.am index 8daa20fe..8ad0fb89 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 # @@ -46,7 +46,7 @@ endif if BUILD_CD_DRIVE 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 endif @@ -64,19 +64,19 @@ endif if BUILD_CD_READ 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 endif if BUILD_ISO_INFO 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 endif if BUILD_ISO_READ 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 endif diff --git a/src/cd-paranoia/Makefile.am b/src/cd-paranoia/Makefile.am index 68da5e0a..893195db 100644 --- a/src/cd-paranoia/Makefile.am +++ b/src/cd-paranoia/Makefile.am @@ -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 # Copyright (C) 1998 Monty xiphmont@mit.edu @@ -35,7 +35,7 @@ cd_paranoia_SOURCES = cd-paranoia.c \ buffering_write.c buffering_write.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