diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-07-03 23:12:56 +0900 |
---|---|---|
committer | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2022-07-28 21:57:56 +0900 |
commit | 86cd83ce2348ca8d2e399b50ab8ae3c7abedb9a1 (patch) | |
tree | f7ad61c3431be68ca8bdc361690d316b4811155b | |
parent | 04d166f9a90db05958a3f2ed713244724d2b9004 (diff) |
Add base automake and autoconf files
The librefop use autoconf and automake build strategy.
This patch add initial autoconf and automake files.
Bug-AGL: SPEC-4500
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Change-Id: Id7c171242acca1357fdf02abe147b6f3b9ff7dfa
-rw-r--r-- | Makefile.am | 12 | ||||
-rwxr-xr-x | autogen.sh | 9 | ||||
-rw-r--r-- | configure.ac | 69 | ||||
-rw-r--r-- | libredundancyfileop.pc.in | 11 |
4 files changed, 101 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..2fbf961 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +SUBDIRS = lib + +if ENABLE_TEST +SUBDIRS += test +endif + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libredundancyfileop.pc + +CLEANFILES = libredundancyfileop.pc + + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..916169a --- /dev/null +++ b/autogen.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. +( + cd "$srcdir" && + autoreconf --force -v --install +) || exit +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..f95ddd0 --- /dev/null +++ b/configure.ac @@ -0,0 +1,69 @@ +AC_PREREQ([2.69]) + +AC_INIT([exsample], [1.0]) + +AM_INIT_AUTOMAKE([foreign subdir-objects]) + +#AC_CONFIG_SRCDIR([src/exsample.cpp]) + +AC_CONFIG_HEADERS([include/config.h]) + +AC_CONFIG_MACRO_DIR([m4]) + + +AC_ARG_ENABLE([address-sanitizer], + [AS_HELP_STRING([--enable-address-sanitizer], [Enable address sanitizer in build time (for debug, default is no)])], + [:], + [enable_address_sanitizer=no]) +AM_CONDITIONAL([ENABLE_ADDRESS_SANITIZER], [test "$enable_address_sanitizer" = "yes"]) + +AC_ARG_ENABLE([gcov], + [AS_HELP_STRING([--enable-gcov], [Enable gcov in build time (for debug, default is no)])], + [:], + [enable_gcov=no]) +AM_CONDITIONAL([ENABLE_GCOV], [test "$enable_gcov" = "yes"]) + +AC_ARG_ENABLE([test], + [AS_HELP_STRING([--enable-test], [Enable unit test build (requir to gtest and gmock, default is no])], + [:], + [enable_test=no]) +AM_CONDITIONAL([ENABLE_TEST], [test "$enable_test" = "yes"]) + + +AC_ARG_ENABLE([printfdebug], + [AS_HELP_STRING([--enable-printfdebug], [Enable user printf debug (default is no)])], + [:], + [enable_printfdebug=no]) +AM_CONDITIONAL([ENABLE_PRINTFDEBUG], [test "$enable_printfdebug" = "yes"]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL + +AC_DISABLE_STATIC + +# Checks for libraries. +LT_INIT +AC_PROG_LIBTOOL + +PKG_PROG_PKG_CONFIG +PKG_CHECK_MODULES([GTEST_MAIN], [gtest_main], , enable_test=no) +PKG_CHECK_MODULES([GMOCK_MAIN], [gmock_main], , enable_test=no) + + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +AC_CONFIG_FILES([ + Makefile + libredundancyfileop.pc + lib/Makefile + test/Makefile + ]) + +AC_OUTPUT + diff --git a/libredundancyfileop.pc.in b/libredundancyfileop.pc.in new file mode 100644 index 0000000..5f84ec8 --- /dev/null +++ b/libredundancyfileop.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libredundancyfileop +Description: Redundancy file operation library +Requires: +Version: 1.0 +Libs: -L${libdir} -lexsample +Cflags: -I${includedir} |