Commit a3c5863c authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Use BUILD_* variables only if they are set to non-empty strings.

parent 8cbdfd3f
......@@ -502,22 +502,22 @@ AM_CONDITIONAL([with_perf_programs],
AC_ARG_VAR([BUILD_CFLAGS],
[append to CFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([CFLAGS="$CFLAGS${BUILD_CFLAGS+ $BUILD_CFLAGS}"])
AC_CONFIG_COMMANDS_PRE([CFLAGS="$CFLAGS${BUILD_CFLAGS:+ $BUILD_CFLAGS}"])
AC_ARG_VAR([BUILD_FCFLAGS],
[append to FCFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([FCFLAGS="$FCFLAGS${BUILD_FCFLAGS+ $BUILD_FCFLAGS}"])
AC_CONFIG_COMMANDS_PRE([FCFLAGS="$FCFLAGS${BUILD_FCFLAGS:+ $BUILD_FCFLAGS}"])
AC_ARG_VAR([BUILD_LDFLAGS],
[append to LDFLAGS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([LDFLAGS="$LDFLAGS${BUILD_LDFLAGS+ $BUILD_LDFLAGS}"])
AC_CONFIG_COMMANDS_PRE([LDFLAGS="$LDFLAGS${BUILD_LDFLAGS:+ $BUILD_LDFLAGS}"])
AC_ARG_VAR([BUILD_LIBS],
[prepend to LIBS during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([LIBS="${BUILD_LIBS+$BUILD_LIBS }$LIBS"])
AC_CONFIG_COMMANDS_PRE([LIBS="${BUILD_LIBS:+$BUILD_LIBS }$LIBS"])
AC_ARG_VAR([BUILD_CC],
[replace CC with expansion of $BUILD_CC during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([CC=${BUILD_CC-$CC}])
AC_CONFIG_COMMANDS_PRE([CC=${BUILD_CC:-$CC}])
AC_ARG_VAR([BUILD_FC],
[replace FC with expansion of $BUILD_FC during build but not in configure phase])
AC_CONFIG_COMMANDS_PRE([FC=${BUILD_FC-$FC}])
AC_CONFIG_COMMANDS_PRE([FC=${BUILD_FC:-$FC}])
AC_CONFIG_HEADER([include/config.h])
......
  • I agree that empty BUILD_FC and BUILD_CC are nonsensical and can be assumed unintended. I'll need to think more about the flags variables were e.g. a substitution of CC allows for removing CFLAGS via an empty BUILD_CFLAGS.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment