summaryrefslogtreecommitdiff
path: root/Build/source/texk/psutils/psutils-1.21/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/psutils/psutils-1.21/configure.ac')
-rw-r--r--Build/source/texk/psutils/psutils-1.21/configure.ac80
1 files changed, 80 insertions, 0 deletions
diff --git a/Build/source/texk/psutils/psutils-1.21/configure.ac b/Build/source/texk/psutils/psutils-1.21/configure.ac
new file mode 100644
index 00000000000..40f2ab20683
--- /dev/null
+++ b/Build/source/texk/psutils/psutils-1.21/configure.ac
@@ -0,0 +1,80 @@
+dnl Process this file with autoconf to produce a configure script
+
+AC_INIT(psutils, 1.21, rrt@sc3d.org)
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+dnl Check for programs
+AC_PROG_CC
+gl_EARLY
+AC_PROG_LN_S
+AM_PROG_AR
+
+AC_USE_SYSTEM_EXTENSIONS
+AC_ARG_ENABLE([gcc-warnings],
+ [AS_HELP_STRING([--enable-gcc-warnings],
+ [turn on lots of GCC warnings (for developers)])],
+ [case $enableval in
+ yes|no) ;;
+ *) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
+ esac
+ gl_gcc_warnings=$enableval],
+ [gl_gcc_warnings=no]
+)
+
+if test "$gl_gcc_warnings" = yes; then
+ gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
+
+ # Set up the list of undesired warnings.
+ nw=
+ nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF
+ nw="$nw -Wtraditional" # All compilers nowadays support ANSI C
+ nw="$nw -Wstrict-overflow" # Use a lower level (see below).
+ nw="$nw -Wconversion" # These warnings usually don’t point to mistakes.
+ nw="$nw -Wsign-conversion" # Likewise.
+ nw="$nw -Waggregate-return" # We do this on purpose.
+ nw="$nw -Wtraditional-conversion" # Don't care.
+ nw="$nw -Wpadded" # Don't care.
+ nw="$nw -Wc++-compat" # Don't care.
+ nw="$nw -Woverlength-strings" # Don't care.
+ nw="$nw -Wmissing-format-attribute" # Don't care.
+ nw="$nw -Wshadow" # Don't care.
+ nw="$nw -Wunreachable-code" # Seems buggy.
+ nw="$nw -Wsystem-headers" # glibc headers fail as of glibc 2.15, gcc 4.7
+ nw="$nw -Wall"
+ nw="$nw -Wunused-macros" # those macros might come in handy later
+
+ gl_MANYWARN_ALL_GCC([warnings])
+
+ # Enable all GCC warnings not in this list.
+ gl_MANYWARN_COMPLEMENT([warnings], [$warnings], [$nw])
+ for w in $warnings; do
+ gl_WARN_ADD([$w])
+ done
+
+ # Add an extra warning
+ gl_WARN_ADD([-Wstrict-overflow=1])
+ # Add some more safety measures
+ gl_WARN_ADD([-D_FORTIFY_SOURCE=2])
+ gl_WARN_ADD([-fmudflap])
+fi
+
+gl_INIT
+
+dnl Check for header files
+AC_HEADER_STDC
+AC_CHECK_HEADER([paper.h], [], [AC_MSG_FAILURE([cannot find libpaper header])])
+
+dnl Check for libraries
+AC_PROG_RANLIB
+AC_CHECK_LIB([paper], [paperinfo], [],
+ [AC_MSG_FAILURE([cannot find libpaper library])])
+
+dnl Generate output files
+AC_CONFIG_MACRO_DIR(m4)
+AC_CONFIG_HEADER(config.h)
+AC_CONFIG_FILES(Makefile lib/Makefile)
+AC_OUTPUT