Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
eac2117f
Commit
eac2117f
authored
Oct 21, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some autoconf fun
parent
ba2199db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
67 deletions
+42
-67
configure.ac
configure.ac
+1
-67
m4/Makefile.am
m4/Makefile.am
+1
-0
m4/flags.m4
m4/flags.m4
+40
-0
No files found.
configure.ac
View file @
eac2117f
...
@@ -887,73 +887,7 @@ if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
...
@@ -887,73 +887,7 @@ if test "${ac_cv_c_ntohl_sys_param_h}" != "no"; then
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
fi
fi
# XXX: do this with an M4 macro?
RDC_PROG_CC_WFLAGS_IFELSE([all extra no-unused-parameter conversion unreachable-code sign-compare undef])
#dnl Check for various -W flags
#for flag in "" all unreachable-code conversion sign-compare disabled-optimization
#do
# AC_CACHE_CHECK([if \$CC accepts -W${flag}],
# [ac_cv_c_W${flag}],
# [CFLAGS="-W${flag} ${CFLAGS_save}"
# AC_TRY_COMPILE([],,ac_cv_c_W${flag}=yes, ac_cv_c_W${flag}=no)])
# if test "${ac_cv_c_W${flag}}" != "no"; then
# CFLAGS_save="-W${flag} ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
# CXXFLAGS_save="-W${flag} ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
# OBJCFLAGS_save="-W${flag} ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
# fi
#done
AC_CACHE_CHECK([if $CC accepts -Wall],
[ac_cv_c_Wall],
[CFLAGS="-Wall ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wall=yes, ac_cv_c_Wall=no)])
AC_CACHE_CHECK([if $CC accepts -Wextra],
[ac_cv_c_Wextra],
[CFLAGS="-Wextra ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wextra=yes, ac_cv_c_Wextra=no)])
AC_CACHE_CHECK([if $CC accepts -Wno-unused-parameter],
[ac_cv_c_Wno_unused_parameter],
[CFLAGS="-Wno-unused-parameter ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wno_unused_parameter=yes, ac_cv_c_Wno_unused_parameter=no)])
AC_CACHE_CHECK([if $CC accepts -Wconversion],
[ac_cv_c_Wconversion],
[CFLAGS="-Wconversion ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wconversion=yes, ac_cv_c_Wconversion=no)])
AC_CACHE_CHECK([if $CC accepts -Wunreachable-code],
[ac_cv_c_Wunreachable_code],
[CFLAGS="-Wunreachable-code ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wunreachable_code=yes, ac_cv_c_Wunreachable_code=no)])
AC_CACHE_CHECK([if $CC accepts -Wsign-compare],
[ac_cv_c_Wsign_compare],
[CFLAGS="-Wsign-compare ${CFLAGS_save}"
AC_TRY_COMPILE([],,ac_cv_c_Wsign_compare=yes, ac_cv_c_Wsign_compare=no)])
if test "${ac_cv_c_Wall}" != "no"; then
CFLAGS_save="-Wall ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="-Wall ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
fi
if test "${ac_cv_c_Wextra}" != "no"; then
CFLAGS_save="-Wextra ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="-Wextra ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS_save="-Wextra ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
fi
if test "${ac_cv_c_Wno_unused_parameter}" != "no"; then
CFLAGS_save="${CFLAGS_save} -Wno-unused-parameter"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CFLAGS_save} -Wno-unused-parameter"; CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS_save="${OBJCFLAGS_save} -Wno-unused-parameter "; OBJCFLAGS="${OBJCFLAGS_save}"
fi
if test "${ac_cv_c_Wsign_compare}" != "no"; then
CFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="-Wsign-compare ${CFLAGS_save}"; CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS_save="-Wsign-compare ${OBJCFLAGS_save}"; OBJCFLAGS="${OBJCFLAGS_save}"
fi
dnl Check for -pipe
dnl Check for -pipe
AC_CACHE_CHECK([if \$CC accepts -pipe],
AC_CACHE_CHECK([if \$CC accepts -pipe],
...
...
m4/Makefile.am
View file @
eac2117f
...
@@ -26,5 +26,6 @@ EXTRA_DIST = \
...
@@ -26,5 +26,6 @@ EXTRA_DIST = \
uintmax_t.m4
\
uintmax_t.m4
\
ulonglong.m4
\
ulonglong.m4
\
vlc.m4
\
vlc.m4
\
flags.m4
\
$(NULL)
$(NULL)
m4/flags.m4
0 → 100644
View file @
eac2117f
# <rdenis (at) simphalempin (dot) com>.
# This file (flags.m4) is free software; unlimited permission to
# copy and/or distribute it , with or without modifications, as long
# as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
AC_DEFUN([RDC_PROG_CC_FLAGS_IFELSE],
[AC_LANG_ASSERT(C)
CFLAGS_save="${CFLAGS}"
as_ac_var=`echo "ac_cv_prog_cc_flags_$1" | $as_tr_sh`
AC_CACHE_CHECK([if $CC accepts $1], [$as_ac_var], [
CFLAGS="$1 ${CFLAGS_save}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
eval "$as_ac_var=yes"
],[
eval "$as_ac_var=no"
])
])
ac_res=`echo "${as_ac_var}"`
AS_IF([test "${ac_res}" != "no"], [
CFLAGS="$1 ${CFLAGS_save}"
CXXFLAGS="$1 ${CFLAGS_save}"
OBJCFLAGS="$1 ${OBJCFLAGS_save}"
$2
], [
CFLAGS="${CFLAGS_save}"
$3
])
])
AC_DEFUN([RDC_PROG_CC_WFLAGS],
[ for a in $1; do
RDC_PROG_CC_FLAGS_IFELSE([-W$a])
done
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment