Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alberta3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
ians-nmh-siebert
alberta
alberta3
Commits
5394e92c
Commit
5394e92c
authored
18 years ago
by
Claus-Justus Heine
Browse files
Options
Downloads
Patches
Plain Diff
merge init-element-branch -> trunk
parent
c0894228
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
m4/check-iso-c99.m4
+30
-0
30 additions, 0 deletions
m4/check-iso-c99.m4
with
30 additions
and
0 deletions
m4/check-iso-c99.m4
0 → 100644
+
30
−
0
View file @
5394e92c
#
# We need (at least) two features from the C99 standard: variadic
# macros and variable length arrays. We check here whether or those
# are available.
#
# Note that we do not further modify the compiler flags, we just check
# whether variadic macros and variable length arrays are available.
#
# The macro takes 2 arguments:
#
# $1: optional: a set of compiler flags in addition to CFLAGS
#
AC_DEFUN([ALBERTA_ISO_C99_CHECK],
[AC_REQUIRE([AC_PROG_CC])
_alberta_save_cflags="${CFLAGS}"
m4_if($#,1,[CFLAGS="$1"])
AC_LANG_PUSH([C])
AC_MSG_CHECKING([for ISO C99 features with "${CC} ${CFLAGS}"])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[extern void exit(int status);
#define FOO(a, ...) (a, __VA_ARGS__)
extern int foo(int a, int b, int c);]],
[[int bar[foo FOO(3, 4, 5)];
exit(bar[0]);]])],
[AC_MSG_RESULT([variadic macros and variable length arrays available])],
[AC_MSG_FAILURE([variadic macros and/or vairable length arrays NOT available])])
AC_LANG_POP([C])
CFLAGS="${_alberta_save_cflags}"
])
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