]> git.saurik.com Git - apple/launchd.git/blob - launchd/configure.ac
launchd-258.12.tar.gz
[apple/launchd.git] / launchd / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.61)
5
6 AC_INIT([launchd],[1.0],[launchd-bug-reports@group.apple.com])
7 AC_CONFIG_SRCDIR([src/launchd.c])
8 AM_INIT_AUTOMAKE
9 AC_CONFIG_HEADERS([src/config.h])
10
11 # Checks for programs.
12 AC_PROG_CC
13 AC_PROG_RANLIB
14 AM_PROG_CC_C_O
15
16 # Checks for header files.
17 AC_HEADER_DIRENT
18 AC_HEADER_STDC
19 AC_HEADER_SYS_WAIT
20 AC_CHECK_HEADERS([fcntl.h limits.h mach/mach.h netdb.h netinet/in.h paths.h stddef.h stdlib.h string.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h])
21
22 # Checks for typedefs, structures, and compiler characteristics.
23 AC_HEADER_STDBOOL
24 AC_C_CONST
25 AC_TYPE_UID_T
26 AC_TYPE_MODE_T
27 AC_TYPE_OFF_T
28 AC_TYPE_PID_T
29 AC_TYPE_SIZE_T
30 AC_HEADER_TIME
31 AC_STRUCT_TM
32
33 # Checks for library functions.
34 AC_FUNC_ALLOCA
35 AC_FUNC_CLOSEDIR_VOID
36 AC_FUNC_FORK
37 AC_PROG_GCC_TRADITIONAL
38 AC_FUNC_LSTAT
39 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
40 AC_FUNC_MKTIME
41 AC_FUNC_SELECT_ARGTYPES
42 AC_TYPE_SIGNAL
43 AC_FUNC_STAT
44 AC_CHECK_FUNCS([atexit dup2 gethostname gettimeofday malloc mmap memmove memset mkdir munmap realloc rmdir select setenv socket strcasecmp strchr strdup strerror strrchr strstr strtol])
45
46 # check for a Security framework that includes session support
47 ac_func_search_save_LIBS=$LIBS
48 LIBS="-framework Security $ac_func_search_save_LIBS"
49 AC_CHECK_FUNC([SessionCreate],
50 [AC_DEFINE(HAVE_SECURITY, 1, [Define to 1 if you have the Security framework])
51 AC_SUBST(LIBS_SECURITY,"-framework Security")
52 AC_SUBST(WEAKLIBS_SECURITY,"-weak_framework Security")])
53 LIBS=$ac_func_search_save_LIBS
54
55 # check for seatbelt
56 AC_CHECK_FUNC([sandbox_init],[AC_DEFINE(HAVE_SANDBOX, 1, [Define to 1 if you have the sandbox library])])
57
58 # check for quarantine
59 AC_CHECK_FUNC([_qtn_proc_init_with_data],[AC_DEFINE(HAVE_QUARANTINE, 1, [Define to 1 if you have the quarantine library])])
60
61 AC_CONFIG_FILES([Makefile
62 src/Makefile])
63
64 AM_CONDITIONAL(LIBS_ONLY, test "$RC_ProjectName" = launchd_libs)
65 AM_CONDITIONAL(DO_EMBEDDED_MAGIC, test $(tconf --test TARGET_OS_EMBEDDED) = YES)
66
67
68 AC_OUTPUT