da64dc6332cf8aeaa837320955e1379ea339f5cc
[gnulib.git] / m4 / stdalign.m4
1 # Check for stdalign.h that conforms to C1x.
2
3 dnl Copyright 2011 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 # Prepare for substituting <stdalign.h> if it is not supported.
9
10 AC_DEFUN([gl_STDALIGN_H],
11 [
12   AC_CHECK_HEADERS_ONCE([stdalign.h])
13
14   if test $ac_cv_header_stdalign_h = yes; then
15     STDALIGN_H=''
16   else
17     STDALIGN_H='stdalign.h'
18   fi
19
20   AC_SUBST([STDALIGN_H])
21   AM_CONDITIONAL([GL_GENERATE_STDALIGN_H], [test -n "$STDALIGN_H"])
22 ])