Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
0969045b
Commit
0969045b
authored
12 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
configure: add internal sanity check (warn only) on vars for makefiles
parent
c30c557e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure.ac
+95
-0
95 additions, 0 deletions
configure.ac
with
95 additions
and
0 deletions
configure.ac
+
95
−
0
View file @
0969045b
...
...
@@ -3614,6 +3614,101 @@ squeeze CURL_NETWORK_AND_TIME_LIBS
squeeze SUPPORT_FEATURES
squeeze SUPPORT_PROTOCOLS
dnl
dnl Some sanity checks for LIBS, LDFLAGS, CPPFLAGS and CFLAGS values that
dnl configure is going to feed into makefiles generated by automake. Due
dnl to automake placement and usage of these variables we have to follow
dnl its rules or we may get funny results later on at make-time.
dnl
dnl
dnl LIBS should only specify libraries
dnl
AC_MSG_NOTICE([using LIBS: $LIBS])
tst_bad_spec="no"
for word1 in $LIBS; do
case "$word1" in
-l* | --library=*)
:
;;
*)
tst_bad_spec="yes"
;;
esac
done
if test "$tst_bad_spec" = "yes"; then
AC_MSG_WARN([oops, LIBS should only specify libraries.])
fi
dnl
dnl LDFLAGS should only specify linker flags
dnl
AC_MSG_NOTICE([using LDFLAGS: $LDFLAGS])
tst_bad_msg="oops, LDFLAGS should only specify linker flags, not"
for word1 in $LDFLAGS; do
case "$word1" in
-D*)
AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
;;
-U*)
AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
;;
-I*)
AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
;;
-l* | --library=*)
AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
;;
esac
done
dnl
dnl CPPFLAGS should only specify C preprocessor flags
dnl
AC_MSG_NOTICE([using CPPFLAGS: $CPPFLAGS])
tst_bad_msg="oops, CPPFLAGS should only specify C preprocessor flags, not"
for word1 in $CPPFLAGS; do
case "$word1" in
-rpath*)
AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
;;
-L* | --library-path=*)
AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
;;
-l* | --library=*)
AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
;;
esac
done
dnl
dnl CFLAGS should only specify C compiler flags
dnl
AC_MSG_NOTICE([using CFLAGS: $CFLAGS])
tst_bad_msg="oops, CFLAGS should only specify C compiler flags, not"
for word1 in $CFLAGS; do
case "$word1" in
-D*)
AC_MSG_WARN([$tst_bad_msg macro definitions. Use CPPFLAGS for: $word1])
;;
-U*)
AC_MSG_WARN([$tst_bad_msg macro suppressions. Use CPPFLAGS for: $word1])
;;
-I*)
AC_MSG_WARN([$tst_bad_msg include directories. Use CPPFLAGS for: $word1])
;;
-rpath*)
AC_MSG_WARN([$tst_bad_msg library runtime directories. Use LDFLAGS for: $word1])
;;
-L* | --library-path=*)
AC_MSG_WARN([$tst_bad_msg library directories. Use LDFLAGS for: $word1])
;;
-l* | --library=*)
AC_MSG_WARN([$tst_bad_msg libraries. Use LIBS for: $word1])
;;
esac
done
if test "x$want_curldebug_assumed" = "xyes" &&
test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
ac_configure_args="$ac_configure_args --enable-curldebug"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment