default value of LIBA_CXX is set to 1
[liba.git] / script / autogen
blob5e990662c09d787ed20bfdce170ffff4685cb952
1 #!/usr/bin/env sh
2 cd $(dirname $0)
4 mkdir -p ../build
5 cp config.h.in configure.ac ../build
6 cd ..
7 cp -r src include/a build
8 cd build
10 for i in $(find a -regex ".*\.\(h\|hh\)"); do
11 HEADERS="$HEADERS $i"
12 done
14 for i in $(find src -regex ".*\.\(c\|h\)"); do
15 C_SOURCES="$C_SOURCES $i"
16 done
18 for i in $(find src -regex ".*\.\(cc\|hh\)"); do
19 CXX_SOURCES="$CXX_SOURCES $i"
20 done
22 echo "ACLOCAL_AMFLAGS = -I m4
23 lib_LTLIBRARIES = liba.la
24 liba_la_CPPFLAGS = -std=c11
25 liba_la_LDFLAGS = -version-info 1:9:1
26 liba_la_SOURCES =$C_SOURCES autogen.sh
27 liba_la_LIBADD = \$(liba_cc_la_OBJECTS)
28 noinst_LTLIBRARIES = liba.cc.la
29 liba_cc_la_CPPFLAGS = -std=c++11
30 liba_cc_la_SOURCES =$CXX_SOURCES
31 nobase_include_HEADERS =$HEADERS
32 install-data-hook:
33 \$(INSTALL_DATA) config.h \$(DESTDIR)\$(includedir)/a
34 @sed -i 's|#if defined(A_HAVE_H)|#include \"config.h\"\\\\n#if defined(A_HAVE_H)|g' \$(DESTDIR)\$(includedir)/a/a.h
35 uninstall-hook:
36 \$(RM) \$(DESTDIR)\$(includedir)/a/config.h" > Makefile.am
38 echo "libtoolize -Wall -ci
39 aclocal -Wall
40 autoreconf -Wall
41 automake -Wall --add-missing
42 if [ -f config.h.in~ ] && [ -f config.h.in ]; then
43 mv config.h.in~ config.h.in
44 fi" > autogen.sh
45 chmod +x autogen.sh
46 ./autogen.sh
47 ./configure
48 make distcheck dist-xz