[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compile order of LDFLAGS and LIBS
From: |
Brian White |
Subject: |
compile order of LDFLAGS and LIBS |
Date: |
Wed, 21 Jan 2004 11:20:07 -0500 |
Package: autoconf
Version: 2.53
When testing for the existance of functions in libraries, the LIBS
variable is located after the LDFLAGS variable. I was wondering if it
would make more sense to always put the LDFLAGS variable at the end.
Currently:
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext
$LIBS >&5'
Suggested:
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS conftest.$ac_ext $LIBS
$LDFLAGS >&5'
The reason for this is some LDFLAGS (such as "-lc" required for uclinux)
have to be at the end of the line.
I tried setting the LIBS variable to "-lc" on the command line (while
removing it from the LDFLAGS variable) and that worked for the initial
configure but failed if I did ./config-status --recheck because the
LIBS varible was not saved and re-set (though CFLAGS and LDFLAGS were).
Brian
( address@hidden )
-------------------------------------------------------------------------------
Differences are good. If two people agree, one of them is redundant.
- compile order of LDFLAGS and LIBS,
Brian White <=
Re: compile order of LDFLAGS and LIBS, Ralf Corsepius, 2004/01/22