[Xbubble-commits] xbubble configure.ac,NONE,1.1

Martin Quinson xbubble-devel@lists.alioth.debian.org
Mon, 06 Dec 2004 08:08:13 +0000


Update of /cvsroot/xbubble/xbubble
In directory haydn:/tmp/cvs-serv24286

Added Files:
	configure.ac 
Log Message:
Import from savanah

--- NEW FILE: configure.ac ---
dnl Process this file with autoconf to create configure.
AC_INIT(README)
AM_INIT_AUTOMAKE(xbubble,0.5.10)
AM_MAINTAINER_MODE
AM_CONFIG_HEADER([src/config.h])

dnl Checks for programs.
AC_PROG_CC
CFLAGS="$CFLAGS -Wall"

dnl Checks for headers.
AC_HEADER_STDC
AC_CHECK_HEADER(unistd.h,,[AC_MSG_ERROR([cannot find unistd.h !])])
AC_CHECK_HEADER(limits.h,,[AC_MSG_ERROR([cannot find limits.h !])])
AC_CHECK_HEADER(signal.h,,[AC_MSG_ERROR([cannot find signal.h !])])
AC_CHECK_HEADER(setjmp.h,,[AC_MSG_ERROR([cannot find setjmp.h !])])
AC_CHECK_HEADER(sys/time.h,,[AC_MSG_ERROR([cannot find sys/time.h !])])
AC_CHECK_HEADER(png.h,,[AC_MSG_ERROR([cannot find libpng header png.h !])])

dnl Checks for libraries.
AC_CHECK_LIB(png, png_read_info, LIBS="-lpng -lz -lm $LIBS",
  [AC_MSG_ERROR([cannot find libpng !])],[ -lz -lm ])

dnl Checks for X Window.
AC_PATH_X
if test x"$no_x" != x; then
  AC_MSG_ERROR([cannot find X Window include files and libraries !])
fi
if test x"$x_includes" != x; then
  CPPFLAGS="$CPPFLAGS -I$x_includes"
fi
LIBS="-L$x_libraries $LIBS"
AC_CHECK_LIB(X11, XOpenDisplay,,[AC_MSG_ERROR([cannot find libX11 !])])


dnl
dnl Check NLS
dnl
dnl FIXME: For now, it's impossible to fix the localedir at ./configure time
dnl (would requiere changes in autoconf itself)
dnl

AC_SUBST([localedir],         ['${datadir}/locale'])dnl
# Be sure to have absolute path for localedir.
while echo $localedir | grep -q '\$' >/dev/null ; do 
  localedir=`eval echo "$localedir"`
done
localedir=`echo $localedir|sed 's|NONE|/usr/local|'`
case $localedir in
      [[\\/$]]* | ?:[[\\/]]* | NONE* | '' ) ;;
      *)  AC_MSG_ERROR([expected an absolute directory name for --localedir: $localedir]);;
esac

AM_GNU_GETTEXT([external])
AC_DEFINE_UNQUOTED(LOCALEDIR,"$localedir",[Where to put the l10n])

AC_OUTPUT(Makefile src/Makefile man/Makefile data/Makefile \
          po/Makefile.in m4/Makefile)