blob: 88939383057d1e668870fa4ce3138043be6fbd03 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# Process this file with autoconf to produce a configure script.
2AC_INIT(libvppinfra,1.0,)
3AC_CONFIG_AUX_DIR(config)
4AC_CONFIG_HEADERS(config/config.h)
5AC_CANONICAL_BUILD
6AC_CANONICAL_HOST
7AM_INIT_AUTOMAKE([gnu no-dist-gzip dist-bzip2])
Damjan Marion6b1d7c52016-04-26 18:19:47 +02008AM_SILENT_RULES([yes])
Ed Warnickecb9cada2015-12-08 15:45:58 -07009
10# Checks for programs.
11AC_PROG_CC
12AM_PROG_AS
13AM_PROG_LIBTOOL
14
15######################################################################
16
17dnl ------------
18dnl Check CFLAGS, CC
19dnl ------------
20AC_ARG_WITH(cc,
21 AC_HELP_STRING([--with-cc],[Set CC for use as C compiler.]),
22 [CC="$with_cc"])
23
24AC_ARG_WITH(cflags,
25 AC_HELP_STRING([--with-cflags],[Set CFLAGS for use by C compiler.]),
26 [CFLAGS="$with_cflags"])
27
28AC_ARG_WITH(ldflags,
29 AC_HELP_STRING([--with-ldflags],[Set LDFLAGS for linking.]),
30 [LDFLAGS="$with_ldflags"])
31
32######################################################################
33
Damjan Marionc47e9792016-04-11 13:34:36 +020034AC_ARG_ENABLE(tests,
35 AC_HELP_STRING([--enable-tests],[Enable unit tests]),
36 [enable_tests=1],
37 [enable_tests=0])
38
39AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" = "1")
40
Ed Warnickecb9cada2015-12-08 15:45:58 -070041AC_ARG_WITH(unix,
42 AC_HELP_STRING([--with-unix],[Compile unix version of clib]),
43 [],
44 [case $host_os in
45 darwin* | linux*) with_unix=yes;;
46 *) with_unix=no;;
47 esac])
48
49AM_CONDITIONAL(WITH_UNIX, test "$with_unix" = "yes")
50
Ed Warnickecb9cada2015-12-08 15:45:58 -070051AC_CONFIG_FILES([Makefile])
52AC_OUTPUT