dnl Template Configure script for "General applet interface" applets dnl version 0.4.1 dnl Written by Jonas Aaberg 2002-2003 dnl dnl run autoconf to generate a configure script from this file. AC_PREREQ(2.13) AC_INIT() dnl ********************************************** dnl Change those things between the star lines. dnl ********************************************** dnl This is the name of your applet, low level. $(APPLET_NAME).c is the main dnl c file. APPLET_NAME="gai-va" dnl The version APPLET_VERSION="0.3" dnl The display name in the gnome 2 menu. APPLET_NAME_MENU="GAI Visual Audio" dnl Change the group. dnl Valid groups are: dnl "Accessories", "Amusements", "Internet", "Multimedia" and "Utility" APPLET_GROUP="Multimedia" dnl The name file of the icon for the menu. APPLET_NAME_ICON="gai-va-icon.png" dnl Images to install. APPLET_IMAGES="images/*" dnl A one line description for the gnome menu. APPLET_DESCRIPTION="Visualizing the XMMS output" dnl Version of GAI that is required APPLET_REQUIRES_GAI_VERSION="0.5.0" dnl ********************************************** AC_PROG_CC AC_ISC_POSIX AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_SUBST(APPLET_NAME) AC_SUBST(APPLET_GROUP) AC_SUBST(APPLET_NAME_MENU) AC_SUBST(APPLET_NAME_ICON) AC_SUBST(APPLET_IMAGES) AC_SUBST(APPLET_DESCRIPTION) AC_SUBST(APPLET_VERSION) dnl OS check AC_MSG_CHECKING(operating system) OSTYPE=`uname -s` AC_MSG_RESULT($OSTYPE) HOST="UNKNOWN" SYSTEM_SPECIFIC_LIBS= case $OSTYPE in Linux) HOST="LINUX" ;; Darwin) HOST="DARWIN" ;; FreeBSD) HOST="FREEBSD" SYSTEM_SPECIFIC_LIBS="-lkvm" ;; OpenBSD) HOST="OPENBSD" ;; NetBSD) HOST="NETBSD" ;; SunOS) HOST="SUNOS" ;; esac AC_SUBST(HOST) AC_SUBST(SYSTEM_SPECIFIC_LIBS) dnl gai AC_CHECK_PROG(PKGCONF, pkg-config, true, false) if $PKGCONF ; then AC_MSG_CHECKING(for gai) if `pkg-config --exists gai` ; then AC_MSG_RESULT(yes) GAI_CFLAGS=`pkg-config --cflags gai` GAI_LIBS=`pkg-config --libs gai` else AC_MSG_RESULT(no) AC_MSG_ERROR(gai is required! You can find it at http://gai.sf.net) fi else AC_MSG_ERROR("can't find pkg-config!") fi AC_CHECK_PROG(XMMS, xmms-config, true, false) if $XMMS ; then XMMS_CFLAGS=`xmms-config --cflags` XMMS_LIBS=`xmms-config --libs` AC_SUBST(XMMS_CFLAGS) AC_SUBST(XMMS_LIBS) else AC_MSG_ERROR("can't find xmms-config! XMMS installed?") fi AC_MSG_CHECKING(for gai version >= $APPLET_REQUIRES_GAI_VERSION) if `pkg-config gai --atleast-version $APPLET_REQUIRES_GAI_VERSION` ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR(A newer version of gai is required!\nPlease visit http://gai.sf.net) fi AC_SUBST(GAI_CFLAGS) AC_SUBST(GAI_LIBS) rm -f config.h echo "/* Empty */" >config.h AC_MSG_CHECKING(if gai is compiled with gnome support) if test `pkg-config gai --variable=gnome` = yes; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([for gnome prefix]) with_gnome_prefix=`(pkg-config --variable=prefix libpanelapplet-2.0) 2>/dev/null` if test $? -ne 0; then with_gnome_prefix='${prefix}' fi AC_MSG_RESULT([$with_gnome_prefix]) GNOMEDIR=$with_gnome_prefix AC_SUBST(GNOMEDIR) INSTALL_TYPE=install-gnome AC_SUBST(INSTALL_TYPE) dnl Images if test x$APPLET_IMAGES = x; then INSTALL_IMAGES_GNOME= else INSTALL_IMAGES_GNOME=install-images-gnome fi AC_SUBST(INSTALL_IMAGES_GNOME) AC_OUTPUT(GNOME_DefaultApplet.server) else AC_MSG_RESULT(no) GNOMEDIR='$(PREFIX)' INSTALL_TYPE=install-gtk AC_SUBST(INSTALL_TYPE) AC_SUBST(GNOMEDIR) dnl Images if test x$APPLET_IMAGES = x; then INSTALL_IMAGES_GTK= else INSTALL_IMAGES_GTK=install-images-gtk fi AC_SUBST(INSTALL_IMAGES_GTK) fi AC_OUTPUT(Makefile)