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

@ -0,0 +1,42 @@
AC_INIT(envy24control.c)
AM_INIT_AUTOMAKE(envy24control, 0.6.0)
AC_PROG_CC
AC_PROG_INSTALL
AC_HEADER_STDC
AM_PATH_GTK(1.0.1)
AM_PATH_ALSA(1.0.0)
ENVY24CONTROL_CFLAGS="$CFLAGS $ALSA_CFLAGS $GTK_CFLAGS"
ENVY24CONTROL_LIBS="$LIBS $ALSA_LIBS $GTK_LIBS"
AC_SUBST(ENVY24CONTROL_CFLAGS)
AC_SUBST(ENVY24CONTROL_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)