Skip to content

Commit

Permalink
build: actually set LDFLAGS and LIBS in makefiles
Browse files Browse the repository at this point in the history
Both variables are used inside on src/prog.mk and src/so.mk, but they
are not currently defined in any makefile, so their values cannot be
substituted by ./configure.

This means that the variables can be set when running make (such as with
`make LDFLAGS=-Lfoo`), but changing them in configure.ac has no effect.
The same applies when trying to set them when running ./configure (such
as with `./configure LDFLAGS=-Lfoo`).
  • Loading branch information
kmk3 committed Dec 3, 2022
1 parent 55e3c58 commit 671c3f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ MANFLAGS = $(HAVE_LTS) $(HAVE_OUTPUT) $(HAVE_X11) $(HAVE_PRIVATE_HOME) $(HAVE_AP

CC=@CC@
CFLAGS=@CFLAGS@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@

ifdef NO_EXTRA_CFLAGS
else
Expand Down
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5260,8 +5260,10 @@ cat <<EOF
Compile options:
CC: $CC
CFLAGS: $CFLAGS
LDFLAGS: $LDFLAGS
EXTRA_CFLAGS: $EXTRA_CFLAGS
EXTRA_LDFLAGS: $EXTRA_LDFLAGS
LIBS: $LIBS
fatal warnings: $HAVE_FATAL_WARNINGS
gcov instrumentation: $HAVE_GCOV
install as a SUID executable: $HAVE_SUID
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ cat <<EOF
Compile options:
CC: $CC
CFLAGS: $CFLAGS
LDFLAGS: $LDFLAGS
EXTRA_CFLAGS: $EXTRA_CFLAGS
EXTRA_LDFLAGS: $EXTRA_LDFLAGS
LIBS: $LIBS
fatal warnings: $HAVE_FATAL_WARNINGS
gcov instrumentation: $HAVE_GCOV
install as a SUID executable: $HAVE_SUID
Expand Down

0 comments on commit 671c3f2

Please sign in to comment.