-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfigure.ac
175 lines (145 loc) · 6.08 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#
# Copyright 2005-2007 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# configure.ac -- input file for configure script
#
# Note: make sure to run build-configure.sh when any changes are
# made to this file or to any of the files in aclocal
AC_PREREQ(2.57)
AC_INIT(DTNME)
AC_CONFIG_SRCDIR([dtn-version.h])
AC_CONFIG_HEADER([dtn-config.h])
#AC_CONFIG_AUX_DIR([tools])
AC_PREFIX_DEFAULT([/usr])
# Stick a comment in the generated file so people know what to do.
AC_REVISION([-- DO NOT EDIT THIS FILE! See the instructions in configure.ac --])
AC_COPYRIGHT([
Copyright 2005-2007 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
])
AC_DEFINE(DTN_CONFIG_STATE, 1,
[always defined so code can ensure that dtn-config.h is properly included])
# This is handy to re-run configure but use any options you used before.
AC_ARG_WITH(
[previous-options],
[AS_HELP_STRING(
[--with-previous-options],
[read config.status for configure options])],
[
if test -r ./config.status &&
args=`sed -n '7s/^# [^ ]* //p' config.status`
then
set -x
exec $0 $args
fi
])
# First set srcdir and builddir, calculated above in AC_CONFIG_SRCDIR
AC_MSG_CHECKING([location of source directory])
SRCDIR=`(cd $srcdir && pwd)`
AC_MSG_RESULT([$SRCDIR])
AC_SUBST([SRCDIR])
builddir=`pwd`
AC_MSG_CHECKING([location of build directory])
AC_MSG_RESULT([$builddir])
BUILDDIR=$builddir
AC_SUBST([BUILDDIR])
# -------------------------------------------------------------------------
# Arrange to place files in /etc and /var by default, if --prefix is not used
# -------------------------------------------------------------------------
if test "x$prefix" = "xNONE" ; then
# possibly the value was overridden without --prefix being used.
# This is a slightly imperfect test because conceivably someone might
# use something like --sysconfdir=\${prefix}/etc and that will get
# clobbered.
case $sysconfdir in
*[[$]]*) sysconfdir='/etc' ;;
esac
case $localstatedir in
*[[$]]*) localstatedir='/var' ;;
esac
fi
# fully expand the pathnames before they go into the config.h file
oasys_save_prefix=$prefix
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
eval oasys_conf_dir=`echo $sysconfdir`
AC_DEFINE_UNQUOTED(INSTALL_SYSCONFDIR, "$oasys_conf_dir",
[directory for config files (default /etc)])
eval oasys_conf_dir=`echo $localstatedir`
AC_DEFINE_UNQUOTED(INSTALL_LOCALSTATEDIR, "$oasys_conf_dir",
[directory for local state (default /var)])
prefix=$oasys_save_prefix
# -------------------------------------------------------------------------
# Configure find oasys
# -------------------------------------------------------------------------
AC_OASYS_WITH_DTNME_CONFIG
# -------------------------------------------------------------------------
# Dump the autoconf cache now to try to avoid redundant checks
# -------------------------------------------------------------------------
AC_CACHE_SAVE
#--------------------------------------------------------------------------
# Checks for other optional features that may depend on third-party
# libraries.
#--------------------------------------------------------------------------
AC_CONFIG_BONJOUR
AC_CONFIG_SCRIPT_APIS
AC_CONFIG_ODBC
AC_CONFIG_WOLFSSL
AC_CONFIG_TINYCBOR
# -------------------------------------------------------------------------
# Configure gcc
# -------------------------------------------------------------------------
AC_OASYS_CONFIG_GCC
#--------------------------------------------------------------------------
# Configure for 64 bit Bundle IDs
#--------------------------------------------------------------------------
AC_CONFIG_BID64BIT
#--------------------------------------------------------------------------
# Check if BARD should be enabled
#--------------------------------------------------------------------------
AC_CONFIG_BARD
#--------------------------------------------------------------------------
# Check if DTPC should be enabled
#--------------------------------------------------------------------------
AC_CONFIG_DTPC
#--------------------------------------------------------------------------
# Check if ECOS should be enabled
#--------------------------------------------------------------------------
AC_CONFIG_ECOS
# -------------------------------------------------------------------------
# Output
# -------------------------------------------------------------------------
INCFLAGS="-I\$(OASYS_INCDIR)/oasys/ext -I\$(SRCDIR)/servlib"
AC_SUBST(INCFLAGS)
AC_CONFIG_FILES([Rules.make:$OASYS_ETCDIR/Rules.make.in])
AC_CONFIG_FILES([System.make:$OASYS_ETCDIR/System.make:System.make.in])
AC_CONFIG_FILES([servlib/dtpc.make:servlib/dtpc.make.in])
if test ! $SRCDIR = `pwd` ; then
AC_CONFIG_FILES([Makefile:Makefile-Builddir.in])
AC_CONFIG_FILES([applib/Makefile:applib/Makefile-Builddir.in])
AC_CONFIG_FILES([servlib/Makefile:servlib/Makefile-Builddir.in])
AC_CONFIG_FILES([daemon/Makefile:daemon/Makefile-Builddir.in])
AC_CONFIG_FILES([apps/Makefile:apps/Makefile-Builddir.in])
fi
AC_OUTPUT
gmake buildopts