|
1 # |
|
2 # Copyright 2005-2007 Intel Corporation |
|
3 # |
|
4 # Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 # you may not use this file except in compliance with the License. |
|
6 # You may obtain a copy of the License at |
|
7 # |
|
8 # http://www.apache.org/licenses/LICENSE-2.0 |
|
9 # |
|
10 # Unless required by applicable law or agreed to in writing, software |
|
11 # distributed under the License is distributed on an "AS IS" BASIS, |
|
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 # See the License for the specific language governing permissions and |
|
14 # limitations under the License. |
|
15 # |
|
16 |
|
17 # |
|
18 # configure.ac -- input file for configure script |
|
19 # |
|
20 # Note: make sure to run build-configure.sh when any changes are |
|
21 # made to this file or to any of the files in aclocal |
|
22 |
|
23 AC_PREREQ(2.57) |
|
24 AC_INIT(DTN2) |
|
25 AC_CONFIG_SRCDIR([dtn-version.h]) |
|
26 AC_CONFIG_HEADER([dtn-config.h]) |
|
27 AC_CONFIG_AUX_DIR([tools]) |
|
28 AC_PREFIX_DEFAULT([/usr]) |
|
29 |
|
30 # Stick a comment in the generated file so people know what to do. |
|
31 AC_REVISION([-- DO NOT EDIT THIS FILE! See the instructions in configure.ac --]) |
|
32 |
|
33 AC_COPYRIGHT([ |
|
34 Copyright 2005-2007 Intel Corporation |
|
35 |
|
36 Licensed under the Apache License, Version 2.0 (the "License"); |
|
37 you may not use this file except in compliance with the License. |
|
38 You may obtain a copy of the License at |
|
39 |
|
40 http://www.apache.org/licenses/LICENSE-2.0 |
|
41 |
|
42 Unless required by applicable law or agreed to in writing, software |
|
43 distributed under the License is distributed on an "AS IS" BASIS, |
|
44 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
45 See the License for the specific language governing permissions and |
|
46 limitations under the License. |
|
47 |
|
48 ]) |
|
49 |
|
50 AC_DEFINE(DTN_CONFIG_STATE, 1, |
|
51 [always defined so code can ensure that dtn-config.h is properly included]) |
|
52 |
|
53 # This is handy to re-run configure but use any options you used before. |
|
54 AC_ARG_WITH( |
|
55 [previous-options], |
|
56 [AS_HELP_STRING( |
|
57 [--with-previous-options], |
|
58 [read config.status for configure options])], |
|
59 [ |
|
60 if test -r ./config.status && |
|
61 args=`sed -n '7s/^# [^ ]* //p' config.status` |
|
62 then |
|
63 set -x |
|
64 exec $0 $args |
|
65 fi |
|
66 ]) |
|
67 |
|
68 # First set srcdir and builddir, calculated above in AC_CONFIG_SRCDIR |
|
69 AC_MSG_CHECKING([location of source directory]) |
|
70 SRCDIR=`(cd $srcdir && pwd)` |
|
71 AC_MSG_RESULT([\"$SRCDIR\"]) |
|
72 AC_SUBST([SRCDIR]) |
|
73 |
|
74 builddir=`pwd` |
|
75 AC_MSG_CHECKING([location of build directory]) |
|
76 AC_MSG_RESULT([\"$builddir\"]) |
|
77 BUILDDIR=$builddir |
|
78 AC_SUBST([BUILDDIR]) |
|
79 |
|
80 # ------------------------------------------------------------------------- |
|
81 # Arrange to place files in /etc and /var by default, if --prefix is not used |
|
82 # ------------------------------------------------------------------------- |
|
83 if test "x$prefix" = "xNONE" ; then |
|
84 # possibly the value was overridden without --prefix being used. |
|
85 # This is a slightly imperfect test because conceivably someone might |
|
86 # use something like --sysconfdir=\${prefix}/etc and that will get |
|
87 # clobbered. |
|
88 case $sysconfdir in |
|
89 *[[$]]*) sysconfdir='/etc' ;; |
|
90 esac |
|
91 case $localstatedir in |
|
92 *[[$]]*) localstatedir='/var' ;; |
|
93 esac |
|
94 fi |
|
95 |
|
96 # fully expand the pathnames before they go into the config.h file |
|
97 oasys_save_prefix=$prefix |
|
98 test "x$prefix" = "xNONE" && prefix=$ac_default_prefix |
|
99 eval oasys_conf_dir=`echo $sysconfdir` |
|
100 AC_DEFINE_UNQUOTED(INSTALL_SYSCONFDIR, "$oasys_conf_dir", |
|
101 [directory for config files (default /etc)]) |
|
102 eval oasys_conf_dir=`echo $localstatedir` |
|
103 AC_DEFINE_UNQUOTED(INSTALL_LOCALSTATEDIR, "$oasys_conf_dir", |
|
104 [directory for local state (default /var)]) |
|
105 prefix=$oasys_save_prefix |
|
106 |
|
107 # ------------------------------------------------------------------------- |
|
108 # Configure find oasys |
|
109 # ------------------------------------------------------------------------- |
|
110 AC_OASYS_CONFIG(1,3) |
|
111 |
|
112 # ------------------------------------------------------------------------- |
|
113 # Dump the autoconf cache now to try to avoid redundant checks |
|
114 # ------------------------------------------------------------------------- |
|
115 AC_CACHE_SAVE |
|
116 |
|
117 #-------------------------------------------------------------------------- |
|
118 # Checks for other optional features that may depend on third-party |
|
119 # libraries. |
|
120 #-------------------------------------------------------------------------- |
|
121 AC_CONFIG_BONJOUR |
|
122 AC_CONFIG_EXTERNAL_CL |
|
123 AC_CONFIG_EXTERNAL_DP |
|
124 AC_CONFIG_NORM |
|
125 AC_CONFIG_LTP |
|
126 |
|
127 #-------------------------------------------------------------------------- |
|
128 # Check if BSP should be enabled, and if so, look for OpenSSL |
|
129 #-------------------------------------------------------------------------- |
|
130 AC_CONFIG_BSP |
|
131 AC_CONFIG_OPENSSL |
|
132 |
|
133 # ------------------------------------------------------------------------- |
|
134 # Configure gcc |
|
135 # ------------------------------------------------------------------------- |
|
136 AC_OASYS_CONFIG_GCC |
|
137 |
|
138 |
|
139 # ------------------------------------------------------------------------- |
|
140 # Output |
|
141 # ------------------------------------------------------------------------- |
|
142 |
|
143 INCFLAGS="-I\$(OASYS_INCDIR)/oasys/ext -I\$(SRCDIR)/servlib" |
|
144 AC_SUBST(INCFLAGS) |
|
145 |
|
146 AC_CONFIG_FILES([Rules.make:$OASYS_ETCDIR/Rules.make.in]) |
|
147 AC_CONFIG_FILES([System.make:$OASYS_ETCDIR/System.make]) |
|
148 |
|
149 if test ! $SRCDIR = `pwd` ; then |
|
150 AC_CONFIG_FILES([Makefile:Makefile-Builddir.in]) |
|
151 AC_CONFIG_FILES([applib/Makefile:applib/Makefile-Builddir.in]) |
|
152 AC_CONFIG_FILES([servlib/Makefile:servlib/Makefile-Builddir.in]) |
|
153 AC_CONFIG_FILES([daemon/Makefile:daemon/Makefile-Builddir.in]) |
|
154 AC_CONFIG_FILES([apps/Makefile:apps/Makefile-Builddir.in]) |
|
155 AC_CONFIG_FILES([sim/Makefile:sim/Makefile-Builddir.in]) |
|
156 AC_CONFIG_FILES([test/Makefile:test/Makefile-Builddir.in]) |
|
157 fi |
|
158 |
|
159 AC_OUTPUT |
|
160 |
|
161 make buildopts |