Support both GTK+1.2 and GTK+2.x

Support both GTK+ 1.2 and GTK+ 2.x in single configure scripts.
GTK+ 2.x is used unless --with-gtk2=no is given.

If you have no gtk1 or gtk2 devel packages, use configure.in-gtk1
or -gtk2 and do autoreconf.
This commit is contained in:
Takashi Iwai 2006-03-29 11:33:02 +00:00
parent 3cda29dba9
commit 5341e4ece0
12 changed files with 114 additions and 56 deletions

View file

@ -3,7 +3,7 @@ bin_PROGRAMS = echomixer
man_MANS =
echomixer_SOURCES = echomixer.c
echomixer_LDFLAGS = @ECHOMIXER_LIBS@
EXTRA_DIST = configure.in-gtk2
EXTRA_DIST = configure.in-gtk1 configure.in-gtk2
AUTOMAKE_OPTIONS = foreign
alsa-dist: distdir

View file

@ -13,7 +13,8 @@ master, PCM and monitors gains separately and it provides emulation of master vo
for cards that don't support it in hardware (all non-Vmixer cards). Furthermore it
has a matrix mixer which is more easy to use than the Echoaudio console interface.
Emixer requires GTK+ 1.2 or above.
Emixer requires GTK+ 1.2 or GTK+ 2.x.
To build with GTK+-1.2, pass --with-gtk2=no configure option.
For more informations: http://xoomer.virgilio.it/g_pochini/ea-emixer.html

View file

@ -5,39 +5,23 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
AC_ARG_WITH(gtk2,
[ --with-gtk2=yes,no Build with GTK+2 (default = yes)],
with_gtk2="$withval", with_gtk2="yes")
if test "$with_gtk2" = "yes"; then
PKG_CHECK_MODULES(ECHOMIXER, gtk+-2.0 alsa >= 1.0.0)
else
AM_PATH_GTK(1.2.0)
AM_PATH_ALSA(1.0.0)
ECHOMIXER_CFLAGS="$CFLAGS $ALSA_CFLAGS $GTK_CFLAGS"
ECHOMIXER_LIBS="$LIBS $ALSA_LIBS $GTK_LIBS"
AC_SUBST(ECHOMIXER_CFLAGS)
AC_SUBST(ECHOMIXER_LIBS)
#AC_SUBST(ALSACTL)
dnl add the mkdir program
AC_ARG_WITH(mkdir-prog,
[ --with-mkdir-prog=PROG Complete path and name from mkdir(optional)],
[mkdir_prog="$withval"], [mkdir_prog=""])
AC_MSG_CHECKING(for MKDIR)
if test "$mkdir_prog" != "" ; then
MKDIR="$mkdir_prog"
else
if test -x "/bin/mkdir" ; then
MKDIR="/bin/mkdir"
elif test -x "${bindir}/mkdir" ; then
MKDIR="${bindir}/mkdir"
elif test -x "${sbindir}/mkdir" ; then
MKDIR="${sbindir}/mkdir"
elif test -x "/sbin/mkdir" ; then
MKDIR="/sbin/mkdir"
elif test -x "/usr/bin/mkdir" ; then
MKDIR="/usr/bin/mkdir"
elif test -x "/usr/sbin/mkdir" ; then
MKDIR="/usr/sbin/mkdir"
else
MKDIR="not found."
fi
fi
AC_MSG_RESULT($MKDIR)
AC_SUBST(MKDIR)
AC_OUTPUT(Makefile)

View file

@ -0,0 +1,14 @@
AC_INIT(echomixer.c)
AM_INIT_AUTOMAKE(echomixer, 1.0.5)
AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
AM_PATH_GTK(1.2.0)
AM_PATH_ALSA(1.0.0)
ECHOMIXER_CFLAGS="$CFLAGS $ALSA_CFLAGS $GTK_CFLAGS"
ECHOMIXER_LIBS="$LIBS $ALSA_LIBS $GTK_LIBS"
AC_SUBST(ECHOMIXER_CFLAGS)
AC_SUBST(ECHOMIXER_LIBS)
AC_OUTPUT(Makefile)