Skip to content

Commit

Permalink
configure: Strip leading space
Browse files Browse the repository at this point in the history
Remove space prefixes in `CFLAGS` and `LDFLAGS` so the values align
in the summary printed at the end of the configure stage.

Signed-off-by: James O. D. Hunt <[email protected]>
  • Loading branch information
jamesodhunt committed Nov 7, 2024
1 parent 5bf5903 commit d3cf3b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7232,6 +7232,12 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## showing result of test '$t': $test_result ##
_ASBOX

# Strip leading space. Note the mandatory use of double quadrigraphs
# to specify the character class to sed(1). We can't use literal
# square brackets as autoconf(1)/m4(1) get upset.
CFLAGS=$(echo "$CFLAGS" | sed 's/^[[:space:]]*//')
LDFLAGS=$(echo "$LDFLAGS" | sed 's/^[[:space:]]*//')

ac_config_files="$ac_config_files Makefile src/Makefile procenv.spec"

cat >confcache <<\_ACEOF
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ AS_BOX($msg)
AS_IF([$t], [test_result=pass], [test_result=fail])
AS_BOX([showing result of test '$t': $test_result])

# Strip leading space. Note the mandatory use of double quadrigraphs
# to specify the character class to sed(1). We can't use literal
# square brackets as autoconf(1)/m4(1) get upset.
CFLAGS=$(echo "$CFLAGS" | sed 's/^@<:@@<:@:space:@:>@@:>@*//')
LDFLAGS=$(echo "$LDFLAGS" | sed 's/^@<:@@<:@:space:@:>@@:>@*//')

AC_CONFIG_FILES([Makefile src/Makefile procenv.spec])
AC_OUTPUT
AC_MSG_RESULT([
Expand Down

0 comments on commit d3cf3b7

Please sign in to comment.