Savannah Patch #7129 from Mike Frysinger:

specifies user-visible e-mail address in AC_INIT
- uses AC_HELP_STRING() for enable/with options
- uses AC_MSG_* instead of `echo` for user notices
- removes redundant test checks for enable/with options
- fixes 3rd arg handling with AC_ARG_ENABLE and --enable-rock and --enable-cddb and --enable-vcd-info
- properly quotes enable/with variables in case someone passes a value with spaces as the enable/with value
This commit is contained in:
R. Bernstein
2010-03-23 16:20:35 -04:00
parent 9a59c307ac
commit 3b933bb375

View File

@@ -22,7 +22,7 @@ define(CDIO_VERSION_STR, 0.$1git)
AC_PREREQ(2.52) AC_PREREQ(2.52)
AC_REVISION([$Id: configure.ac,v 1.238 2008/11/27 21:09:51 rocky Exp $])dnl AC_REVISION([$Id: configure.ac,v 1.238 2008/11/27 21:09:51 rocky Exp $])dnl
AC_INIT([libcdio], [CDIO_VERSION_STR(RELEASE_NUM)]) AC_INIT([libcdio], [CDIO_VERSION_STR(RELEASE_NUM)], [libcdio-help@gnu.org])
AC_CONFIG_SRCDIR(src/cd-info.c) AC_CONFIG_SRCDIR(src/cd-info.c)
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE
@@ -40,41 +40,41 @@ AM_MAINTAINER_MODE
AM_SANITY_CHECK AM_SANITY_CHECK
AC_ARG_WITH(cd-drive, AC_ARG_WITH(cd-drive,
[ --without-cd-drive don't build program cd-drive (default with)], AC_HELP_STRING([--without-cd-drive], [don't build program cd-drive (default with)]),
enable_cd_drive="${withval}", enable_cd_drive=yes) enable_cd_drive="${withval}", enable_cd_drive=yes)
AC_ARG_WITH(cd-info, AC_ARG_WITH(cd-info,
[ --without-cd-info don't build program cd-info (default with)], AC_HELP_STRING([--without-cd-info], [don't build program cd-info (default with)]),
enable_cd_info="${withval}", enable_cd_info=yes) enable_cd_info="${withval}", enable_cd_info=yes)
AC_ARG_WITH(cd-paranoia, AC_ARG_WITH(cd-paranoia,
[ --without-cd-paranoia don't build program cd-paranoia and paranoia libraries (default with)], AC_HELP_STRING([--without-cd-paranoia], [don't build program cd-paranoia and paranoia libraries (default with)]),
enable_cd_paranoia="${withval}", enable_cd_paranoia=yes) enable_cd_paranoia="${withval}", enable_cd_paranoia=yes)
AC_ARG_WITH(cdda-player, AC_ARG_WITH(cdda-player,
[ --without-cdda-player don't build program cdda-player (default with)], AC_HELP_STRING([--without-cdda-player], [don't build program cdda-player (default with)]),
enable_cdda_player="${withval}", enable_cdda_player=yes) enable_cdda_player="${withval}", enable_cdda_player=yes)
AC_ARG_WITH(cd-paranoia-name, AC_ARG_WITH(cd-paranoia-name,
[ --with-cd-paranoia-name name to use as the cd-paranoia program name (default cd-paranoia)], AC_HELP_STRING([--with-cd-paranoia-name], [name to use as the cd-paranoia program name (default cd-paranoia)]),
cd_paranoia_name="${withval}", cd_paranoia_name="cd-paranoia") cd_paranoia_name="${withval}", cd_paranoia_name="cd-paranoia")
CDPARANOIA_NAME="$cd_paranoia_name" CDPARANOIA_NAME="$cd_paranoia_name"
AC_SUBST(CDPARANOIA_NAME) AC_SUBST(CDPARANOIA_NAME)
AC_ARG_WITH(cd-read, AC_ARG_WITH(cd-read,
[ --without-cd-read don't build program cd-read (default with)], AC_HELP_STRING([--without-cd-read], [don't build program cd-read (default with)]),
enable_cd_read="${withval}", enable_cd_read=yes) enable_cd_read="${withval}", enable_cd_read=yes)
AC_ARG_WITH(iso-info, AC_ARG_WITH(iso-info,
[ --without-iso-info don't build program iso-info (default with)], AC_HELP_STRING([--without-iso-info], [don't build program iso-info (default with)]),
enable_iso_info="${withval}", enable_iso_info=yes) enable_iso_info="${withval}", enable_iso_info=yes)
AC_ARG_WITH(iso-read, AC_ARG_WITH(iso-read,
[ --without-iso-read don't build program iso-read (default with)], AC_HELP_STRING([--without-iso-read], [don't build program iso-read (default with)]),
enable_iso_read="${withval}", enable_iso_read=yes) enable_iso_read="${withval}", enable_iso_read=yes)
AC_ARG_WITH(versioned-libs, AC_ARG_WITH(versioned-libs,
[ --without-versioned-libs build versioned library symbols (default enabled if you have GNU ld)], AC_HELP_STRING([--without-versioned-libs], [build versioned library symbols (default enabled if you have GNU ld)]),
enable_versioned_libs="${withval}", enable_versioned_libs=yes) enable_versioned_libs="${withval}", enable_versioned_libs=yes)
AC_ARG_ENABLE([cxx], AC_ARG_ENABLE([cxx],
@@ -82,7 +82,7 @@ AC_ARG_ENABLE([cxx],
AM_CONDITIONAL([ENABLE_CXX_BINDINGS], [test "x$enable_cxx" != "xno"]) AM_CONDITIONAL([ENABLE_CXX_BINDINGS], [test "x$enable_cxx" != "xno"])
AC_ARG_ENABLE(cpp-progs, AC_ARG_ENABLE(cpp-progs,
[ --enable-cpp-progs make C++ example programs (default enabled)]) AC_HELP_STRING([--enable-cpp-progs], [make C++ example programs (default enabled)]))
AM_CONDITIONAL(ENABLE_CPP, test x"$enable_cpp_progs" = "xyes") AM_CONDITIONAL(ENABLE_CPP, test x"$enable_cpp_progs" = "xyes")
AC_ARG_ENABLE(example-progs, AC_ARG_ENABLE(example-progs,
@@ -103,9 +103,10 @@ cd_drivers='cdrdao, BIN/CUE, NRG'
if test "x$GCC" != "xyes" if test "x$GCC" != "xyes"
then then
echo "*** non GNU CC compiler detected." AC_MSG_WARN([
echo "*** This package has not been tested very well with non GNU compilers" *** non GNU CC compiler detected.
echo "*** you should try to use 'gcc' for compiling this package." *** This package has not been tested very well with non GNU compilers
*** you should try to use 'gcc' for compiling this package.])
else else
WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare" WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare"
@@ -539,13 +540,9 @@ if test "${enable_joliet}" != "no" ; then
fi fi
AC_SUBST(HAVE_JOLIET) AC_SUBST(HAVE_JOLIET)
if test x$enable_rock = x; then
enable_rock=yes
AC_ARG_ENABLE(rock, AC_ARG_ENABLE(rock,
[ --enable-rock include Rock-Ridge extension support (default enabled)], AC_HELP_STRING([--enable-rock], [include Rock-Ridge extension support (default enabled)]),
enable_rock=yes, enable_rock=no) enable_rock=$enableval, enable_rock=no)
fi
if test "${enable_rock}" != "no" ; then if test "${enable_rock}" != "no" ; then
AC_DEFINE(HAVE_ROCK, [1], AC_DEFINE(HAVE_ROCK, [1],
[Define 1 if you want ISO-9660 Rock-Ridge extension support.]) [Define 1 if you want ISO-9660 Rock-Ridge extension support.])
@@ -554,13 +551,10 @@ fi
AC_SUBST(HAVE_ROCK) AC_SUBST(HAVE_ROCK)
AM_CONDITIONAL(ENABLE_ROCK, test x"$enable_rock" = "xyes") AM_CONDITIONAL(ENABLE_ROCK, test x"$enable_rock" = "xyes")
if test x$enable_cddb = x; then
enable_cddb=yes
AC_ARG_ENABLE(cddb, AC_ARG_ENABLE(cddb,
[ --enable-cddb include CDDB lookups in cd_info (default enabled)], AC_HELP_STRING([--enable-cddb], [include CDDB lookups in cd_info (default enabled)]),
[], enable_cddb=check) enable_cddb=$enableval, enable_cddb=check)
fi if test x"$enable_cddb" != x"no" ; then
if test x$enable_cddb != x"no" ; then
PKG_CHECK_MODULES(CDDB, libcddb >= 1.0.1, [ PKG_CHECK_MODULES(CDDB, libcddb >= 1.0.1, [
HAVE_CDDB=yes HAVE_CDDB=yes
AC_DEFINE(HAVE_CDDB, [], [Define this if you have libcddb installed]) AC_DEFINE(HAVE_CDDB, [], [Define this if you have libcddb installed])
@@ -575,14 +569,14 @@ fi
AC_SUBST(CDDB_LIBS) AC_SUBST(CDDB_LIBS)
AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad]) AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad])
if test x$enable_cdda_player = xyes; then if test x"$enable_cdda_player" = xyes; then
AC_CHECK_LIB(ncurses, mvprintw, AC_CHECK_LIB(ncurses, mvprintw,
[LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"], [LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
AC_CHECK_LIB(curses, mvprintw, AC_CHECK_LIB(curses, mvprintw,
[LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"], [LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
[AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses]) [AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses])
enable_cdda_player=no])) enable_cdda_player=no]))
if test x$enable_cdda_player = xyes; then if test x"$enable_cdda_player" = xyes; then
AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes]) AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes])
fi fi
fi fi
@@ -590,13 +584,11 @@ fi
AM_CONDITIONAL(BUILD_CDDA_PLAYER, test "x$enable_cdda_player" = "xyes") AM_CONDITIONAL(BUILD_CDDA_PLAYER, test "x$enable_cdda_player" = "xyes")
AC_SUBST(CDDA_PLAYER_LIBS) AC_SUBST(CDDA_PLAYER_LIBS)
if test x$enable_vcd_info = x; then
AC_ARG_ENABLE(vcd_info, AC_ARG_ENABLE(vcd_info,
[ --enable-vcd-info include Video CD Info from libvcd], AC_HELP_STRING([--enable-vcd-info], [include Video CD Info from libvcd]),
enable_vcd_info=yes, enable_vcd_info=${enableval},
enable_vcd_info=no) enable_vcd_info=no)
fi if test "x$enable_vcd_info" = xyes; then
if test x$enable_vcd_info = xyes; then
PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21, PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21,
[AC_DEFINE([HAVE_VCDINFO],1, [AC_DEFINE([HAVE_VCDINFO],1,
[Define this if you have libvcdinfo installed])], [Define this if you have libvcdinfo installed])],
@@ -688,11 +680,12 @@ head -n 254 config.h >> include/cdio/cdio_config.h
AC_OUTPUT AC_OUTPUT
echo "Using CD-ROM drivers : $cd_drivers" AC_MSG_NOTICE([
echo "Building cd-paranoia : $(test "x$enable_cd_paranoia" = "xyes" && echo yes || echo no)" Using CD-ROM drivers : $cd_drivers
echo "Building cd-info : $(test "x$enable_cd_info" = "xyes" && echo yes || echo no)" Building cd-paranoia : $(test "x$enable_cd_paranoia" = "xyes" && echo yes || echo no)
echo "Building cd-read : $(test "x$enable_cd_read" = "xyes" && echo yes || echo no)" Building cd-info : $(test "x$enable_cd_info" = "xyes" && echo yes || echo no)
echo "Building cdda-player : $(test "x$enable_cdda_player" = "xyes" && echo yes || echo no)" Building cd-read : $(test "x$enable_cd_read" = "xyes" && echo yes || echo no)
echo "Building iso-info : $(test "x$enable_iso_info" = "xyes" && echo yes || echo no)" Building cdda-player : $(test "x$enable_cdda_player" = "xyes" && echo yes || echo no)
echo "Building iso-read : $(test "x$enable_iso_read" = "xyes" && echo yes || echo no)" Building iso-info : $(test "x$enable_iso_info" = "xyes" && echo yes || echo no)
echo "Building C++ programs: $(test "x$enable_cxx" != "xno" && echo yes || echo no)" Building iso-read : $(test "x$enable_iso_read" = "xyes" && echo yes || echo no)
Building C++ programs: $(test "x$enable_cxx" != "xno" && echo yes || echo no)])