2 # Process this file with autoconf to produce a configure script.
6 AC_INIT([launchd],[1.0],[launchd-bug-reports@group.apple.com])
7 AC_CONFIG_SRCDIR([src/launchd.c])
9 AC_CONFIG_HEADERS([src/config.h])
11 # Checks for programs.
16 # Checks for header files.
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])
22 # Checks for typedefs, structures, and compiler characteristics.
33 # Checks for library functions.
37 AC_PROG_GCC_TRADITIONAL
39 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
41 AC_FUNC_SELECT_ARGTYPES
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])
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
56 AC_CHECK_FUNC([sandbox_init],[AC_DEFINE(HAVE_SANDBOX, 1, [Define to 1 if you have the sandbox library])])
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])])
61 AC_CONFIG_FILES([Makefile
64 AM_CONDITIONAL(LIBS_ONLY, test "$RC_ProjectName" = launchd_libs)
65 AM_CONDITIONAL(DO_EMBEDDED_MAGIC, test $(tconf --test TARGET_OS_EMBEDDED) = YES)