1 AC_INIT([vcl-ldpreload], [1.0], [vpp-dev@fd.io])
4 AM_INIT_AUTOMAKE([subdir-objects])
6 AC_CONFIG_FILES([Makefile])
7 AC_CONFIG_MACRO_DIR([m4])
15 AC_ARG_VAR(VPP_DIR,[ vpp build directory ])
16 AM_CONDITIONAL([VPP_DIR_SET], [test ! -z "$VPP_DIR"])
18 ###############################################################################
20 ###############################################################################
22 AC_DEFUN([ENABLE_ARG],
25 AC_HELP_STRING(patsubst([--enable-$1],[_],[-]), $2),
26 [enable_$1=yes n_enable_$1=1],
27 [enable_$1=no n_enable_$1=0])
28 AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes")
29 m4_append([list_of_enabled], [$1], [, ])
32 AC_DEFUN([DISABLE_ARG],
35 AC_HELP_STRING(patsubst([--disable-$1],[_],[-]), $2),
36 [enable_$1=no n_enable_$1=0],
37 [enable_$1=yes n_enable_$1=1])
38 AM_CONDITIONAL(m4_toupper(ENABLE_$1), test "$enable_$1" = "yes")
39 m4_append([list_of_enabled], [$1], [, ])
45 AC_HELP_STRING(patsubst([--with-$1],[_],[-]), $2),
46 [with_$1=yes n_with_$1=1],
47 [with_$1=no n_with_$1=0])
48 AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes")
49 m4_append([list_of_with], [$1], [, ])
52 AC_DEFUN([WITHOUT_ARG],
55 AC_HELP_STRING(patsubst([--without-$1],[_],[-]), $2),
56 [with_$1=no n_with_$1=0],
57 [with_$1=yes n_with_$1=1])
58 AM_CONDITIONAL(m4_toupper(WITH_$1), test "$with_$1" = "yes")
59 m4_append([list_of_with], [$1], [, ])
63 AC_DEFUN([PRINT_VAL], [ AC_MSG_RESULT(AC_HELP_STRING($1,$2)) ])
66 ###############################################################################
68 ###############################################################################
72 AC_ARG_ENABLE([vpp-debug],
73 [ --enable-vpp-debug Use vpp debug native build libraries],
74 [if test x$enableval = xyes; then
75 AC_DEFINE(VPP_DEBUG, 1, [Define this to use vpp debug native build libraries.])
77 fi], [vpp_debug=false])
78 AM_CONDITIONAL([VPP_DEBUG], [test x$vpp_debug = xtrue])
80 AC_ARG_ENABLE([vcl-ldpreload-debug],
81 [ --enable-vcl-ldpreload-debug Turn on vcl-ldpreload debugging],
82 [if test x$enableval = xyes; then
83 AC_DEFINE(VCL_LDPRELOAD_DEBUG, 1, [Define this to enable vcl-ldpreload debug.])
84 vcl_ldpreload_debug=true
85 fi], [vcl_ldpreload_debug=false])
86 AM_CONDITIONAL([VCL_LDPRELOAD_DEBUG], [test x$vcl_ldpreload_debug = xtrue])
95 AC_HELP_STRING([--with-unix],[Compile unix version of clib]),
98 darwin* | linux*) with_unix=yes;;
102 AM_CONDITIONAL(WITH_UNIX, test "$with_unix" = "yes")
105 ###############################################################################
106 # Substitutions and defines
107 ###############################################################################
110 # Silence following noise:
111 # ar: `u' modifier ignored since `D' is the default (see `U')
116 ###############################################################################
118 ###############################################################################
120 ###############################################################################
122 ###############################################################################
126 AC_MSG_RESULT([==============================================================================])
127 PRINT_VAL([version], $PACKAGE $VERSION)
128 PRINT_VAL([prefix], ${prefix})
129 PRINT_VAL([exec_prefix], ${exec_prefix})
130 PRINT_VAL([libdir], ${libdir})
131 PRINT_VAL([includedir], ${includedir})
132 PRINT_VAL([CFLAGS], ${CFLAGS})
133 PRINT_VAL([CPPFLAGS], ${CPPFLAGS})
134 PRINT_VAL([LDFLAGS], ${LDFLAGS})
137 AC_MSG_RESULT([with:])
138 m4_foreach([x], m4_dquote(list_of_with), [
139 AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${with_], x, [}])))
143 AC_MSG_RESULT([enabled:])
144 m4_foreach([x], m4_dquote(list_of_enabled), [
145 AC_MSG_RESULT(AC_HELP_STRING(x, m4_join([], [${enable_], x, [}])))
149 AC_MSG_RESULT([==============================================================================])