source: trunk/base/configure.ac @ 9679

Last change on this file since 9679 was 9679, checked in by landonf (Landon Fuller), 16 years ago

Use autoconf to set full path to curl and cvs.
This fixes fetching on systems that have curl/cvs installed outside of the default dports binpath (ie, FreeBSD).

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