You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

80 lines
2.0 KiB

From 0c5836166c1d856eb7f20b9cfc3b6f646b1bf587 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Tue, 4 Jan 2011 21:04:53 +0100
Subject: [PATCH] Add autotools files.
---
Makefile.am | 18 ++++++++++++++++++
configure.ac | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 0 deletions(-)
create mode 100644 Makefile.am
create mode 100644 configure.ac
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..51275c3
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,18 @@
+bin_PROGRAMS = zpaq
+lib_LIBRARIES = libzpaqstub.a
+
+if HAVE_POD2MAN
+man1_MANS = zpaq.1
+
+zpaq.1: zpaq.1.pod
+ $(POD2MAN) $< > $@
+endif
+
+libzpaqstub_a_SOURCES = zpaq.cpp
+
+zpaq_SOURCES = zpaq.cpp libzpaq.h
+zpaq_CPPFLAGS = $(AM_CPPFLAGS) -DOPT='"$(CXX) $(CXXFLAGS) zpaqopt.cpp $(LDFLAGS) @RUNTIME_LDFLAGS@ -o zpaqopt.exe $(LIBS) -lzpaqstub"'
+zpaq_LDADD = -lzpaq
+
+MOSTLYCLEANFILES = zpaq.1
+EXTRA_DIST = zpaq.1.pod
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..24dddc6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,35 @@
+AC_PREREQ([2.60])
+AC_INIT([zpaq], [na])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([1.6 foreign no-dependencies])
+
+AC_LANG([C++])
+AC_PROG_CXX
+AC_PROG_RANLIB
+
+runtime_LDFLAGS='-Wl,--strip-all'
+AC_MSG_CHECKING([whether the linker supports $runtime_LDFLAGS])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS $runtime_LDFLAGS"
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([], [])],
+ [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])
+runtime_LDFLAGS=])
+LDFLAGS=$save_LDFLAGS
+AC_SUBST([RUNTIME_LDFLAGS], [$runtime_LDFLAGS])
+
+AC_CHECK_PROG([POD2MAN], [pod2man], [pod2man])
+AM_CONDITIONAL([HAVE_POD2MAN], [test x"$POD2MAN" != x""])
+AS_IF([test "x$POD2MAN" = x], [
+ AC_MSG_WARN([Unable to find pod2man, manpage will not be generated])
+])
+
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug],
+ [Enable debug])])
+AS_IF([test x"$enable_debug" != x"yes"], [
+ AC_DEFINE([NDEBUG], [1], [Set this to disable debug])
+])
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
--
1.7.6.1