summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-10-30 22:02:11 (GMT)
committerAnas Nashif <anas.nashif@intel.com>2012-10-30 22:02:11 (GMT)
commita086d9b0c33d54bbce83fafe4057e8b8dc28a35e (patch)
tree83210ba51ce2b8488b727aff76a90600d7af049f /configure.ac
downloadchrpath-a086d9b0c33d54bbce83fafe4057e8b8dc28a35e.zip
chrpath-a086d9b0c33d54bbce83fafe4057e8b8dc28a35e.tar.gz
chrpath-a086d9b0c33d54bbce83fafe4057e8b8dc28a35e.tar.bz2
Imported Upstream version 0.13upstream/0.13upstream
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac76
1 files changed, 76 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e534af8
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,76 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT("chrpath", "0.13", pere@hungry.com)
+
+AC_CANONICAL_TARGET
+
+AM_INIT_AUTOMAKE("chrpath", "0.13")
+
+AC_CONFIG_SRCDIR(chrpath.c)
+AM_CONFIG_HEADER(config.h)
+
+AM_MAINTAINER_MODE
+
+CHRPATH_LDRPATH_OPTION
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+
+dnl Checks for libraries.
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([getopt.h elf.h fcntl.h unistd.h link.h sys/link.h])
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(void *)
+
+dnl Checks for library functions.
+AC_CHECK_FUNCS(getopt_long)
+
+if eval "test x$GCC = xyes"; then
+ for flag in \
+ -ansi \
+ -pedantic \
+ -W \
+ -Wall \
+ -Wcast-align \
+ -Wcast-qual \
+ -Wcomments \
+ -Wmissing-declarations \
+ -Wmissing-prototypes \
+ -Wpointer-arith \
+ -Wreturn-type \
+ -Wstrict-prototypes
+ do
+ JAPHAR_GREP_CFLAGS($flag, [ CFLAGS="$CFLAGS $flag" ])
+ done
+fi
+
+AC_ARG_WITH(coverage, [Enable coverage testing],
+[
+ JAPHAR_GREP_CFLAGS(-g, [ CFLAGS="$CFLAGS -g" ])
+ JAPHAR_GREP_CFLAGS(-fprofile-arcs, [ CFLAGS="$CFLAGS -fprofile-arcs" ])
+ JAPHAR_GREP_CFLAGS(-ftest-coverage, [ CFLAGS="$CFLAGS -ftest-coverage" ])
+], [])
+
+AC_CONFIG_FILES([
+ Makefile \
+ testsuite/Makefile \
+ deb/Makefile \
+ ])
+AC_OUTPUT
+
+if test ! -d debian ; then
+ ln -s deb debian
+fi
+
+echo "Configure status:"
+echo "-----------------"
+echo " CC = $CC"
+echo " CFLAGS = $CFLAGS"
+echo " LDRPATH= $LDRPATH"
+echo