X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=configure.ac;h=05c876ecdd28d7b4842f48f031071479e9c8846c;hp=9527379c98d9b0f44689d2406f51f45cd9798eeb;hb=903e9b14c84400579e0d786b7a96e9e587b5849b;hpb=888bbe38a50a1e3224dcef68686a00e2754e8b47 diff --git a/configure.ac b/configure.ac index 9527379..05c876e 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,7 @@ AH_BOTTOM([#endif /* SRD_CONFIG_H */]) # Enable more compiler warnings via -Wall and -Wextra. Add -fvisibility=hidden # and enforce use of SRD_API to explicitly mark all public API functions. -CFLAGS="$CFLAGS -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden" +AM_CFLAGS="$AM_CFLAGS -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden" # Checks for programs. AC_PROG_CC @@ -86,7 +86,7 @@ build_runtc="yes" # Note: glib-2.0 is part of the libsigrokdecode API # (hard pkg-config requirement). AM_PATH_GLIB_2_0([2.24.0], - [CFLAGS="$CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"]) + [AM_CFLAGS="$AM_CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"]) # Python 3 is always needed. # Note: We need to try a few different variants, since some systems have a @@ -125,7 +125,7 @@ AC_SUBST(MODNAME_PYTHON) # We also need to find the name of the python3 executable (for 'make install'). # Some OSes call this python3, some call it python3.2, etc. etc. AC_CHECK_PROGS([PYTHON3], [python3.4 python3.3 python3.2 python3]) -if test "x$PYTHON3" == "x"; then +if test "x$PYTHON3" = "x"; then AC_MSG_ERROR([cannot find python3 executable.]) fi @@ -134,8 +134,7 @@ AC_SEARCH_LIBS([pow], [m]) # The Check unit testing framework is optional. Disable if not found. PKG_CHECK_MODULES([check], [check >= 0.9.4], - [have_check="yes"; CFLAGS="$CFLAGS $check_CFLAGS"; - LIBS="$LIBS $check_LIBS"], [have_check="no"]) + [have_check="yes"], [have_check="no"]) AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") # libsigrok is optional (only used for the protocol decoder test framework). @@ -164,6 +163,8 @@ AC_SUBST(SRD_PACKAGE_VERSION_MINOR) AC_SUBST(SRD_PACKAGE_VERSION_MICRO) AC_SUBST(SRD_PACKAGE_VERSION) +AC_SUBST(AM_CFLAGS) + AM_CONDITIONAL(BUILD_RUNTC, test x"$build_runtc" = "xyes") AC_CONFIG_FILES([Makefile version.h libsigrokdecode.pc])