blob: 588e7dd16b9d1d015cb3ab649452233a6f2d4be5 [file] [log] [blame]
Anlu Yan04f8d3f2017-02-22 09:18:11 -08001AC_INIT(vpp_plugins, 1.0)
Dave Barach2126b352016-02-10 08:42:59 -05002LT_INIT
Ed Warnickecb9cada2015-12-08 15:45:58 -07003AM_INIT_AUTOMAKE
Dave Barachdbacf852016-07-02 10:34:55 -04004AM_SILENT_RULES([yes])
Damjan Marion905a7f52016-07-07 20:27:49 +02005AC_PREFIX_DEFAULT([/usr])
Ed Warnickecb9cada2015-12-08 15:45:58 -07006
Ed Warnickecb9cada2015-12-08 15:45:58 -07007AC_PROG_CC
Ed Warnickecb9cada2015-12-08 15:45:58 -07008
Damjan Marionde024142018-04-25 00:56:08 +02009# Check if compiler supports specific flag
10AC_DEFUN([CC_CHECK_FLAG],
11[
12 AC_MSG_CHECKING([if $CC supports $1])
13 AC_LANG_PUSH([C])
14 ac_saved_cflags="$CFLAGS"
15 CFLAGS="-Werror $1"
16 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
17 [cc_flag_check=yes],
18 [cc_flag_check=no]
19)
20 AC_MSG_RESULT([$cc_flag_check])
21 CFLAGS="$ac_saved_cflags"
22 AC_LANG_POP([C])
23])
24
25CC_CHECK_FLAG("-Wno-address-of-packed-member")
26AS_IF([test "$cc_flag_check" = yes],
27 [CFLAGS="${CFLAGS} -Wno-address-of-packed-member"], [])
28
Ed Warnickecb9cada2015-12-08 15:45:58 -070029AC_OUTPUT([Makefile])
Anlu Yan04f8d3f2017-02-22 09:18:11 -080030
31AC_CONFIG_MACRO_DIR([m4])