forked from parse-community/parse-embedded-sdks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
56 lines (44 loc) · 1.32 KB
/
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
47
48
49
50
51
52
53
54
55
AC_INIT(parse-embedded, 1.0.5, [email protected])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(common/simplejson.c)
AC_CONFIG_SRCDIR(unix/src/parse.c)
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
LT_INIT(disable-static)
AC_SUBST([LIBTOOL_DEPS])
AC_SUBST(INTI_CFLAGS)
AC_SUBST(INTI_LIBS)
AC_PROG_CC
AC_SUBST(CC)
AC_CHECK_LIB(curl, curl_easy_perform)
AC_CHECK_HEADERS(curl/curl.h)
AC_CHECK_LIB(uuid, uuid_generate_random)
AC_CHECK_HEADERS(uuid/uuid.h)
AC_CACHE_CHECK([whether getopt has optreset support],
ac_cv_have_getopt_optreset, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <getopt.h>
]], [[ extern int optreset; optreset = 0; ]])],[ ac_cv_have_getopt_optreset="yes" ],[ ac_cv_have_getopt_optreset="no"
])
])
if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
AC_DEFINE(HAVE_OPTRESET, 1, [Define if optreset exists])
fi
AC_ARG_ENABLE([yun],
[ --enable-yun Enable Arduino Yun support],
[case "${enableval}" in
yes) yun=true ;;
no) yun=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-yun]) ;;
esac],[yun=false])
AM_CONDITIONAL([YUN_SUPPORT], [test x$yun = xtrue])
AC_CONFIG_FILES([
Makefile
unix/Makefile
unix/src/Makefile
common/Makefile
])
AM_COND_IF([YUN_SUPPORT],
[AC_CONFIG_FILES([unix/yun/Makefile])])
AC_OUTPUT