source: trunk/base/configure.ac @ 11975

Last change on this file since 11975 was 11975, checked in by jberry, 14 years ago

Add autoconf checks for launchd; defines new variables have_launchd and launchctl_path.
Regen autoconf.

  • Property svn:eol-style set to native
File size: 3.3 KB
Line 
1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ(2.52)
3AC_INIT([OpenDarwin DarwinPorts], [1.0], [darwinports@opendarwin.org], [darwinports])
4AC_CONFIG_SRCDIR([src/pextlib1.0/Pextlib.c])
5AC_CONFIG_HEADERS([src/config.h])
6AC_CANONICAL_SYSTEM
7
8# Check user PATH for DP paths, and remove as necessary.
9OD_PATH_SCAN
10
11# Checks for programs.
12AC_PROG_CC
13AC_PROG_INSTALL
14AC_PROG_MAKE_SET
15AC_PROG_LN_S
16AC_PATH_PROG(CURL, [curl], [])
17AC_PATH_PROG(CVS, [cvs], [])
18AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
19AC_PATH_PROG(LAUNCHCTL, [launchctl], [])
20
21AC_SUBST(TAR_CMD)
22OD_TAR_NO_SAME_OWNER
23
24# Quiche eaters options.
25if test x$GCC = xyes; then
26        CFLAGS_QUICHEEATERS='-W -Wall -pedantic'
27fi
28AC_SUBST(CFLAGS_QUICHEEATERS)
29
30OD_COMPILER_ATTRIBUTE_UNUSED
31
32OD_PROG_MTREE
33
34AC_SUBST(REPLACEMENT_PROGS)
35
36# set default dports-directory
37DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
38
39# Check for paths
40AC_PREFIX_DEFAULT(/opt/local)
41OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
42OD_PATH_PORTCONFIGDIR
43
44# Check for install ownership
45OD_CHECK_INSTALLUSER
46OD_CHECK_INSTALLGROUP
47OD_DIRECTORY_MODE
48
49# Check for standard header files.
50AC_HEADER_STDC
51AC_HEADER_DIRENT
52AC_HEADER_SYS_WAIT
53AC_HEADER_STAT
54AC_CHECK_HEADERS([limits.h paths.h sys/file.h crt_externs.h fcntl.h sys/fcntl.h sys/cdefs.h err.h libgen.h])
55
56INCLUDES="-I.. -I. $INCLUDES"
57
58# Checks for library functions.
59AC_FUNC_CLOSEDIR_VOID
60AC_FUNC_FORK
61AC_FUNC_STRERROR_R
62AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp])
63
64# Check for md5 implementation
65OD_LIB_MD5
66# Check for X11 and paraphernalia
67OD_CHECK_X11
68
69# Load tclConfig.sh
70SC_PATH_TCLCONFIG
71SC_LOAD_TCLCONFIG
72
73# Check for Tcl public headers
74dnl XXX hardwire CYGPATH (CYGPATH must be set for SC_PUBLIC_TCL_HEADERS)
75CYGPATH=echo
76SC_PUBLIC_TCL_HEADERS
77
78# Check for tclsh binary
79OD_PROG_TCLSH
80
81# Check for Tcl package path
82OD_TCL_PACKAGE_DIR
83
84# Allows building of shared libraries
85SC_ENABLE_SHARED
86
87# Pull compiler / linker values from tclConfig.sh
88CFLAGS_DEBUG=${TCL_CFLAGS_DEBUG}
89CFLAGS_OPTIMIZE=${TCL_CFLAGS_OPTIMIZE}
90LDFLAGS_DEBUG=${TCL_LDFLAGS_DEBUG}
91LDFLAGS_OPTIMIZE=${TCL_LDFLAGS_OPTIMIZE}
92SHLIB_LD=${TCL_SHLIB_LD}
93STLIB_LD=${TCL_STLIB_LD}
94SHLIB_CFLAGS=${TCL_SHLIB_CFLAGS}
95SHLIB_SUFFIX=${TCL_SHLIB_SUFFIX}
96
97AC_SUBST(INCLUDES)
98AC_SUBST(CFLAGS_DEBUG)
99AC_SUBST(CFLAGS_OPTIMIZE)
100AC_SUBST(TCL_DEFS)
101AC_SUBST(STLIB_LD)
102AC_SUBST(SHLIB_LD)
103AC_SUBST(SHLIB_CFLAGS)
104AC_SUBST(SHLIB_LDFLAGS)
105AC_SUBST(SHLIB_SUFFIX)
106AC_SUBST(TCL_STUB_LIB_SPEC)
107AC_SUBST(TCL_CC)
108
109#misc variables that need to be expanded for substitution into tcl
110
111oldprefix=$prefix
112if test "x$prefix" = "xNONE" ; then
113   prefix=$ac_default_prefix
114fi
115
116eval "prefix_expanded=$prefix"
117AC_SUBST(prefix_expanded)
118# do this twice, since there is a nested variable of
119# ${prefix} inside of ${sysconfdir}
120eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR"
121eval "PORTCONFIGDIR_EXPANDED=$PORTCONFIGDIR_EXPANDED"
122AC_SUBST(PORTCONFIGDIR_EXPANDED)
123eval "localstatedir_expanded=$localstatedir"
124AC_SUBST(localstatedir_expanded)
125
126prefix=$oldprefix
127
128dnl man page settings (compressed, links, etc)
129dnl
130dnl SC_CONFIG_MANPAGES
131
132# Output
133
134AC_CONFIG_FILES([
135        Makefile
136        Mk/dports.autoconf.mk
137        doc/prefix.mtree
138        doc/macosx.mtree
139        doc/ports.conf
140        src/darwinports1.0/darwinports_autoconf.tcl
141        src/port1.0/port_autoconf.tcl
142        src/programs/Makefile
143        src/darwinports1.0/darwinports_fastload.tcl
144])
145
146AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.