src/main.c: Make it possible to pass options to the app under test
[memprof.git] / configure.in
bloba99ada50f8f96215d6f396e8b8dfff04863e7c8d
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.52)
5 AC_INIT(memprof, 0.6.2)
6 AC_CONFIG_SRCDIR(memprof.glade)
8 dnl $Format: "AM_INIT_AUTOMAKE(MemProf, $ReleaseVersion$)" $
9 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
11 dnl Specify a configuration file
12 AM_CONFIG_HEADER(config.h)
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
16 dnl Initialize libtool
17 AM_PROG_LIBTOOL
19 dnl Initialize maintainer mode
20 AM_MAINTAINER_MODE
22 AC_PROG_CC
23 AM_PROG_CC_STDC
24 AC_PROG_INSTALL
26 AC_PROG_INTLTOOL
28 changequote(,)dnl
29 if test "x$GCC" = "xyes"; then
30   case " $CFLAGS " in
31   *[\ \ ]-Wall[\ \      ]*) ;;
32   *) CFLAGS="$CFLAGS -Wall" ;;
33   esac
35 changequote([,])dnl
37 debugdir=${libdir}/debug
38          
39 AC_ARG_WITH(separate-debug-dir,
40 [  --with-separate-debug-dir=path   Look for global separate debug info in this path [LIBDIR/debug]],
41 [debugdir="${withval}"])
42         
43 AC_DEFINE_DIR(DEBUGDIR, debugdir,
44               [Look for global separate debug info in this path])
45         
46 dnl GNOME checks (using pkg-config macros) and getting cflags and libs
47 GTK_REQUIRED=2.6.0
48 LIBGLADE_REQUIRED=1.99.9
50 PKG_CHECK_MODULES(MEMPROF,
52         gtk+-2.0 >= $GTK_REQUIRED
53         libglade-2.0 >= $LIBGLADE_REQUIRED
56 AC_SUBST(MEMPROF_CFLAGS)
58 AC_CHECK_HEADER([bfd.h],[],
59                 [AC_MSG_ERROR([Cannot continue: bfd.h not found. Do you have binutils-dev installed?])])
61 if ! uname | grep Linux > /dev/null ; then
62   AC_MSG_ERROR([*** MemProf only works on linux])
65 AC_SUBST(MEMPROF_LIBS)
67 dnl Initialize gettext
68 GETTEXT_PACKAGE=memprof
69 AC_SUBST(GETTEXT_PACKAGE)
70 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
71                    [Identifier for message catalog files])
73 ALL_LINGUAS="am ar az be ca cs da de dz el en_CA en_GB es et eu fi fr hr hu it ja ko lv mk ml ms nb ne nl oc pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW"
74 AM_GLIB_GNU_GETTEXT
76 AC_HAVE_HEADERS(execinfo.h)
77 AC_CHECK_FUNCS(bind_textdomain_codeset backtrace)
80 dnl Remember ACLOCAL_FLAGS for automatic reautogen.
81 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
83 dnl Output the Makefiles
85 AC_CONFIG_FILES([
86 Makefile
87 po/Makefile.in
88 memprof.spec
90 AC_OUTPUT