forked from facebookarchive/liblogfaf
/
configure.ac
46 lines (38 loc) · 951 Bytes
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
AC_INIT(liblogfaf, [1.0], [antont@fb.com])
AC_CONFIG_SRCDIR([src/liblogfaf.c])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_HEADER_STDC
AC_C_CONST
AC_MSG_CHECKING([build with debug output])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debug output [default=no]])],
[debug_enabled="$enableval"],
[debug_enabled=no])
AC_MSG_RESULT([$debug_enabled])
if test x"$debug_enabled" != x"yes"; then
AM_CFLAGS="$AM_CFLAGS -DNDEBUG"
fi
SYSTEM=`uname -s 2>/dev/null`
case "$SYSTEM" in
"Linux"|"Darwin")
DL_LDLIBS="-ldl"
;;
"FreeBSD")
DL_LDLIBS="-lc"
;;
*)
AC_MSG_ERROR(["Unsupported platform: $SYSTEM"])
;;
esac
AC_SUBST([AM_CFLAGS])
AC_SUBST([DL_LDLIBS])
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT