~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Process this file with autoconf to produce a configure script.
 
2
 
 
3
dnl %CopyrightBegin%
 
4
dnl
 
5
dnl Copyright Ericsson AB 1998-2010. All Rights Reserved.
 
6
dnl
 
7
dnl The contents of this file are subject to the Erlang Public License,
 
8
dnl Version 1.1, (the "License"); you may not use this file except in
 
9
dnl compliance with the License. You should have received a copy of the
 
10
dnl Erlang Public License along with this software. If not, it can be
 
11
dnl retrieved online at http://www.erlang.org/.
 
12
dnl
 
13
dnl Software distributed under the License is distributed on an "AS IS"
 
14
dnl basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
15
dnl the License for the specific language governing rights and limitations
 
16
dnl under the License.
 
17
dnl
 
18
dnl %CopyrightEnd%
 
19
 
2
20
AC_PREREQ(2.8)dnl
3
21
 
4
22
AC_INIT()
5
23
 
 
24
LM_PRECIOUS_VARS
 
25
 
6
26
default_cache_file=./config.cache
7
27
 
8
28
if test "x$no_recursion" != "xyes" -a "x$OVERRIDE_CONFIG_CACHE" = "x"; then
19
39
    cache_file=/dev/null
20
40
fi
21
41
 
 
42
case "X$ERL_TOP" in
 
43
    X)
 
44
        ;;
 
45
    X/*)
 
46
        test -f $ERL_TOP/erts/emulator/beam/beam_emu.c || {
 
47
             AC_MSG_ERROR([Invalid \$ERL_TOP])
 
48
        }
 
49
        srcdir="$ERL_TOP";;
 
50
    *)
 
51
        AC_MSG_ERROR([\$ERL_TOP needs to be absolute]);;
 
52
esac
 
53
 
22
54
dnl How to set srcdir absolute is taken from the GNU Emacs distribution
23
55
#### Make srcdir absolute, if it isn't already.  It's important to
24
56
#### avoid running the path through pwd unnecessary, since pwd can
43
75
#
44
76
# Now srcdir is absolute and also the top of Erlang distribution, ERL_TOP.
45
77
#
46
 
ERL_TOP=${srcdir}
 
78
test "X$ERL_TOP" != "X" || ERL_TOP="$srcdir"
47
79
AC_SUBST(ERL_TOP)
48
80
 
49
81
dnl
65
97
TARGET=$host
66
98
AC_SUBST(TARGET)
67
99
 
 
100
if test X$cross_compiling = Xyes; then
 
101
    CROSS_COMPILING=yes
 
102
else
 
103
    CROSS_COMPILING=no
 
104
fi
 
105
AC_SUBST(CROSS_COMPILING)
 
106
 
 
107
 
 
108
AC_ARG_ENABLE(bootstrap-only,
 
109
[  --enable-bootstrap-only enable bootstrap only configuration],
 
110
[ if test "X$enableval" = "Xyes"; then
 
111
     BOOTSTRAP_ONLY=yes
 
112
  else
 
113
     BOOTSTRAP_ONLY=no  
 
114
  fi    
 
115
],
 
116
BOOTSTRAP_ONLY=no)
 
117
 
 
118
AC_SUBST(BOOTSTRAP_ONLY)
 
119
 
 
120
if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then
 
121
    AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system])
 
122
fi
68
123
 
69
124
dnl Checks for programs.
70
125
 
71
126
AC_PROG_CC
72
 
 
 
127
AC_PROG_CXX
 
128
AC_CHECK_TOOL(LD, [ld])
73
129
 
74
130
#
75
131
# We need GNU make, complain if we can't find it
123
179
AC_PROG_RANLIB
124
180
 
125
181
#
126
 
# Get erts version from erts/vsn.mk
 
182
# Get erts version and otp release from erts/vsn.mk
127
183
#
128
 
[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
 
184
AC_MSG_CHECKING([ERTS version])
 
185
[ERTS=erts-`sed -n "s/^VSN[      ]*=[    ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
 
186
AC_MSG_RESULT([$ERTS])
129
187
AC_SUBST(ERTS)
130
188
 
 
189
AC_MSG_CHECKING([OTP release])
 
190
[OTP=OTP-`sed -n "s/^SYSTEM_VSN[         ]*=[    ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
 
191
AC_MSG_RESULT([$OTP])
 
192
AC_SUBST(OTP)
131
193
 
132
194
AC_ARG_ENABLE(threads,
133
195
[  --enable-threads        enable async thread support
147
209
AC_ARG_ENABLE(hipe,
148
210
[  --enable-hipe           enable hipe support
149
211
  --disable-hipe          disable hipe support])
 
212
                        
 
213
AC_ARG_WITH(javac,
 
214
[  --with-javac=JAVAC      specify Java compiler to use
 
215
  --with-javac            use a Java compiler if found (default)
 
216
  --without-javac         don't use any Java compiler])
150
217
 
151
218
AC_ARG_ENABLE(megaco_flex_scanner_lineno,
152
219
[  --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
169
236
[  --enable-shared-zlib        enable using shared zlib library
170
237
  --disable-shared-zlib       disable shared zlib, compile own zlib source (default)])
171
238
 
172
 
#
173
 
# Set Erlang man page directory
174
 
#
175
 
AC_ARG_ENABLE(erlang-mandir,
176
 
[  --disable-erlang-mandir do not install Erlang man pages in a private directory],
177
 
[ case "$enableval" in
178
 
    no) erl_mandir=$mandir ;;
179
 
    *)  erl_mandir='$(ERLANG_ILIBDIR)/man' ;;
180
 
  esac ], erl_mandir='$(ERLANG_ILIBDIR)/man')
181
 
AC_SUBST(erl_mandir)
 
239
dnl This functionality has been lost along the way... :(
 
240
dnl It could perhaps be nice to reintroduce some day; therefore,
 
241
dnl it is not removed just commented out.
 
242
dnl
 
243
dnl #
 
244
dnl # Set Erlang man page directory
 
245
dnl #
 
246
dnl AC_ARG_ENABLE(erlang-mandir,
 
247
dnl [  --disable-erlang-mandir do not install Erlang man pages in a private directory],
 
248
dnl [ case "$enableval" in
 
249
dnl     no) erl_mandir=$mandir ;;
 
250
dnl     *)  erl_mandir='$(erlang_libdir)/man' ;;
 
251
dnl   esac ], erl_mandir='$(erlang_libdir)/man')
 
252
dnl AC_SUBST(erl_mandir)
182
253
 
183
254
AC_ARG_ENABLE(darwin-universal,
184
255
[  --enable-darwin-universal    build universal binaries on darwin i386],
205
276
  esac
206
277
],enable_m64_build=no)
207
278
 
 
279
AC_ARG_ENABLE(m32-build,
 
280
[  --enable-m32-build    build 32bit binaries using the -m32 flag to (g)cc],
 
281
[ case "$enableval" in
 
282
    no) enable_m32_build=no ;;
 
283
    *)
 
284
        if test X${enable_darwin_64bit} = Xyes -o  X${enable_m64_build} = Xyes;
 
285
        then
 
286
                AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ;
 
287
        fi ;
 
288
        enable_m32_build=yes ;;
 
289
  esac
 
290
],enable_m32_build=no)
 
291
 
208
292
dnl OK, we might have darwin switches off different kinds, lets 
209
293
dnl check it all before continuing.
210
294
TMPSYS=`uname -s`-`uname -m`
248
332
        LDFLAGS="-m64 $LDFLAGS"
249
333
        export LDFLAGS
250
334
fi
 
335
if test X${enable_m32_build} = Xyes; then
 
336
        enable_hipe=no
 
337
        CFLAGS="-m32 $CFLAGS"
 
338
        export CFLAGS
 
339
        LDFLAGS="-m32 $LDFLAGS"
 
340
        export LDFLAGS
 
341
fi
251
342
 
252
343
export ERL_TOP
253
344
AC_CONFIG_SUBDIRS(lib erts)