>From fef175cbef588079d80d31e933fc5fad8dc2beec Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Mon, 11 Oct 2010 02:36:06 +0200 Subject: [PATCH] use autotools --- Makefile.am | 24 ++++++++++++++++++++++++ configure.ac | 30 ++++++++++++++++++++++++++++++ doc/Makefile.am | 6 ++++++ testsuite/Makefile.am | 1 + 4 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 Makefile.am create mode 100644 configure.ac create mode 100644 doc/Makefile.am create mode 100644 testsuite/Makefile.am diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..1455838 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,24 @@ +SUBDIRS = doc testsuite + +AM_CPPFLAGS = -DPROGVERSION=\"$(PACKAGE_VERSION)\" + +sbin_PROGRAMS = ddrescue + +ddrescue_SOURCES = \ + arg_parser.cc \ + arg_parser.h \ + block.cc \ + block.h \ + ddrescue.cc \ + ddrescue.h \ + fillbook.cc \ + logbook.cc \ + rescuebook.cc \ + main.cc + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz + $(am__remove_distdir) + +distclean-local: + $(RM) $(distdir).tar.gz $(distdir).tar.lz diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..6ae180a --- /dev/null +++ b/configure.ac @@ -0,0 +1,30 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.65]) +AC_INIT([ddrescue], [1.13], address@hidden) +AC_CONFIG_SRCDIR([logbook.cc]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE() + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_MODE_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_CHECK_FUNCS([strerror]) + +AC_CONFIG_FILES([Makefile + doc/Makefile + testsuite/Makefile]) +AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..1d8a286 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,6 @@ +dist_man_MANS = ddrescue.1 +info_TEXINFOS = ddrescue.texinfo + +ddrescue.1: $(top_srcdir)/main.cc $(top_srcdir)/configure.ac + $(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir) ddrescue$(EXEEXT) + help2man -n 'data recovery tool' -o $@ $(top_builddir)/ddrescue$(EXEEXT) diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am new file mode 100644 index 0000000..1615a8f --- /dev/null +++ b/testsuite/Makefile.am @@ -0,0 +1 @@ +EXTRA_DIST = check.sh logfile1 logfile2 test.txt -- 1.7.0.4