configure.ac 1.2 KB
Newer Older
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
1
AC_PREREQ([2.64])
Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
2
AC_INIT([libaec], [1.0.1], [rosenhauer@dkrz.de])
Luis Kornblueh's avatar
Luis Kornblueh committed
3 4

AC_CONFIG_MACRO_DIR([m4])
5
AC_CONFIG_AUX_DIR([config])
6
AC_CONFIG_SRCDIR([src/libaec.h])
7 8
AC_CONFIG_HEADERS(config/config.h)

Luis Kornblueh's avatar
Luis Kornblueh committed
9
LT_INIT
10
gl_VISIBILITY
11
AM_INIT_AUTOMAKE([foreign])
12
AM_MAINTAINER_MODE([enable])
13 14

AC_PROG_CC
15
AC_PROG_CXX
16

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
17
AC_HEADER_STDC
18

Mathis Rosenhauer's avatar
Mathis Rosenhauer committed
19
AC_C_BIGENDIAN
20 21 22 23 24 25
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_SIZE_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
26 27
AC_C_INLINE
AC_C_RESTRICT
28 29

AC_CHECK_FUNCS([memset strstr])
30
AC_CHECK_DECLS(__builtin_clzll)
31

32
AM_EXTRA_RECURSIVE_TARGETS([bench benc bdec])
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52

AC_ARG_ENABLE([fuzzing],
  AS_HELP_STRING([--enable-fuzzing], [Enable fuzzing of libaec]))

AS_IF([test "x$enable_fuzzing" = "xyes"], [
  AX_COMPILER_VENDOR
  AS_IF([test "x$ax_cv_c_compiler_vendor" = "xclang"], [
    AC_LANG_PUSH([C++])
    AX_COMPILER_VENDOR
    AC_LANG_POP([C++])
    AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xclang"], [], [
      AC_MSG_ERROR([You need to build with Clang as CXX for fuzzing to work])
    ])
  ], [
    AC_MSG_ERROR([You need to build with Clang as CC for fuzzing to work])
  ])
])
AM_CONDITIONAL([AEC_FUZZING], [test x$enable_fuzzing = xyes])

AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile fuzzing/Makefile])
53
AC_OUTPUT