-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.ac
65 lines (55 loc) · 1.83 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
56
57
58
59
60
61
62
63
64
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([syncd], [0.9], [bec8@students.calvin.edu])
# remove b/c no config.h?
# AM_INIT_AUTOMAKE([1.14 foreign no-define])
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
#libtool init
LT_INIT([dlopen])
# Checks for libraries
# FIXME: Replace `main' with a function in `-lc':
#AC_CHECK_LIB([c], [main])
# function in `-lcurl':
AC_CHECK_LIB([curl], [curl_global_init])
# function in `-ldl': #FIXME this probs isn't supposed to be a hard req
AC_CHECK_LIB([ltdl], [lt_dlsym])
# function in `-lpthread':
AC_CHECK_LIB([pthread], [pthread_create])
# function in `-lrest':
AC_CHECK_LIB([rest], [rest_build_param])
# json-c:
AC_CHECK_LIB([json-c], [json_object_new_object])
# libuv
AC_CHECK_LIB([uv], [uv_run])
#posix semaphore and shared memory
AC_CHECK_LIB([rt], [shm_open])
# inotify:
AC_CHECK_HEADER(sys/inotify.h,
[AC_DEFINE(HAVE_INOTIFY_H, 1,
[Define to 1 if you have <sys/inotify.h>.])],
[AC_MSG_NOTICE([No inotify, using libuv as a backup])])
# libtdl
LT_CONFIG_LTDL_DIR([libltdl])
AC_CONFIG_MACRO_DIR([m4])
LTDL_INIT([recursive])
AC_CONFIG_FILES([libltdl/Makefile])
# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_CHECK_FUNCS([ftruncate mkdir strchr strdup strerror])
AC_OUTPUT(Makefile librest/Makefile libdropbox/Makefile libgdrive/Makefile libexec/Makefile src/Makefile )