Skip to content

Commit acecc27

Browse files
Merge pull request #47 from smithlabcode/update-build-system
Updating the build system
2 parents ca5acc5 + d03eaaf commit acecc27

File tree

4 files changed

+43
-56
lines changed

4 files changed

+43
-56
lines changed

Makefile

Lines changed: 0 additions & 54 deletions
This file was deleted.

Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ EXTRA_DIST = README.md
1818

1919
ACLOCAL_AMFLAGS = -I m4
2020

21-
CXXFLAGS = -Wall -Wextra -Wpedantic
22-
CXXFLAGS += -O3 -DNDEBUG
21+
# For thing we don't want users to override
22+
AM_CXXFLAGS = -Wall -Wextra -Wpedantic
23+
24+
# Users can override this; by default it would get -O2 -g
25+
CXXFLAGS = -O3 -DNDEBUG
2326

2427
lib_LIBRARIES = libsmithlab_cpp.a
2528

autogen.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
#
3+
# Run 'autoreconf -i' to generate 'configure', 'Makefile.in', etc.
4+
#
5+
# The first time this is run on a new cloned git repo the configure
6+
# script will not be present, only the configure.ac and
7+
# Makefile.am. The rest must be generated by `autoreconf -i`.
8+
#
9+
# If you are working with a distribution (file ending with ".tar.gz"
10+
# or similar) then this script should not be needed, and should not be
11+
# present, as all the files should already exist. You should only run
12+
# this script if you know what you are doing with autoreconf.
13+
#
14+
# This script will only work with an argument to confirm the help
15+
# message has been read.
16+
17+
runautoreconf() {
18+
autoreconf -i;
19+
}
20+
21+
if test -d .git && test "$(basename "${PWD}")" = "smithlab_cpp"
22+
then
23+
runautoreconf
24+
exit 0
25+
else
26+
echo " It seems you are either attempting to run this script "
27+
echo " from the wrong directory, or in a source tree that was "
28+
echo " not obtained by cloning the smithlab_cpp git repo. "
29+
echo " "
30+
echo " ./autogen.sh generates the configure script. Only run "
31+
echo " "
32+
echo " this if you know what you are doing with autoreconf and "
33+
echo " are simply avoiding doing that. If you just want to use "
34+
echo " the software, download a release and this script will "
35+
echo " not be needed. "
36+
exit 1
37+
fi

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ AM_CONDITIONAL([ENABLE_HTS], [test "x$enable_hts" = "xyes"])
5050

5151
dnl check for required libraries
5252
AC_CHECK_LIB([z],[zlibVersion])
53+
AC_CHECK_HEADERS([zlib.h], , [echo "Did not find zlib.h header"; exit -1])
5354

5455
AC_CONFIG_FILES([Makefile])
5556
AC_OUTPUT

0 commit comments

Comments
 (0)