Skip to content

Commit

Permalink
Fix Bashisms in configure.ac
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Apr 8, 2021
1 parent aa5a722 commit a0ee6f8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ AC_CHECK_MEMBERS([struct stat.st_mtim.tv_nsec])
EXTRA_CFLAGS=
EXTRA_LDFLAGS=

AX_CHECK_LINK_FLAG([-rdynamic], [EXTRA_LDFLAGS+="-rdynamic"], [])
AX_CHECK_LINK_FLAG([-rdynamic],
[EXTRA_LDFLAGS="$EXTRA_LDFLAGS -rdynamic"])

AX_CHECK_COMPILE_FLAG([-fPIC],
[PIC_FLAG="-fPIC"],
Expand Down Expand Up @@ -240,13 +241,13 @@ fi

AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror], [Treat warnings as errors])],
[EXTRA_CFLAGS+=" -Werror"])
[EXTRA_CFLAGS="$EXTRA_CFLAGS -Werror"])

AC_ARG_ENABLE([ubsan],
[AS_HELP_STRING([--enable-ubsan], [Enable undefined behaviour sanitiser])],
[if test x$enableval = xyes; then
EXTRA_CFLAGS+=" -fsanitize=undefined"
EXTRA_LDFLAGS+=" -fsanitize=undefined"
EXTRA_CFLAGS="$EXTRA_CFLAGS -fsanitize=undefined"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -fsanitize=undefined"
fi])

case $host_os in
Expand Down Expand Up @@ -277,8 +278,8 @@ AC_ARG_ENABLE([gcov],
[enable_gcov=$enableval],
[])
if test x$enable_gcov = xyes ; then
EXTRA_CFLAGS+=" --coverage -fno-inline -Og"
EXTRA_LDFLAGS+=" --coverage"
EXTRA_CFLAGS="$EXTRA_CFLAGS --coverage -fno-inline -Og"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS --coverage"
AC_MSG_WARN([code coverage with gcov is for use in development only])
fi
AM_CONDITIONAL([ENABLE_GCOV], [test x$enable_gcov = xyes])
Expand Down

0 comments on commit a0ee6f8

Please sign in to comment.