Appendix D. Examples

Table of Contents

Example D.1. configure.c.ac

dnl SPDX-FileCopyrightText: 2009- Diego Elio Pettenò
dnl
dnl SPDX-License-Identifier: MIT

AC_INIT
AC_PROG_CC

AC_CHECK_HEADERS([thisonlyworksonc99.h])

AC_OUTPUT

Example D.2. configure.c99.ac

dnl SPDX-FileCopyrightText: 2009- Diego Elio Pettenò
dnl
dnl SPDX-License-Identifier: MIT

AC_INIT
AC_PROG_CC
AC_PROG_CC_C99

AC_CHECK_HEADERS([thisonlyworksonc99.h])

AC_OUTPUT

Example D.3. thisonlyworksonc99.h

// SPDX-FileCopyrightText: 2009- Diego Elio Pettenò
//
// SPDX-License-Identifier: MIT

#if __STDC_VERSION__ != 199901L
# error "Sorry this won't work"
#endif