~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

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 "$cross_compiling" = "yes"; 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
AS_HELP_STRING([--enable-bootstrap-only],
 
110
               [enable bootstrap only configuration]),
 
111
[ if test "X$enableval" = "Xyes"; then
 
112
     BOOTSTRAP_ONLY=yes
 
113
  else
 
114
     BOOTSTRAP_ONLY=no  
 
115
  fi    
 
116
],
 
117
BOOTSTRAP_ONLY=no)
 
118
 
 
119
AC_SUBST(BOOTSTRAP_ONLY)
 
120
 
 
121
if test $CROSS_COMPILING = yes -a $BOOTSTRAP_ONLY = yes; then
 
122
    AC_MSG_ERROR([Cannot both cross compile and build a bootstrap system])
 
123
fi
68
124
 
69
125
dnl Checks for programs.
70
126
 
71
127
AC_PROG_CC
72
 
 
 
128
AC_PROG_CXX
 
129
AC_CHECK_TOOL(LD, [ld])
73
130
 
74
131
#
75
132
# We need GNU make, complain if we can't find it
123
180
AC_PROG_RANLIB
124
181
 
125
182
#
126
 
# Get erts version from erts/vsn.mk
 
183
# Get erts version and otp release from erts/vsn.mk
127
184
#
128
 
[ERTS=erts-`sed -n 's/^VSN[ ]*=[ ]*\([0-9.]\)/\1/p' < erts/vsn.mk`]
129
 
AC_SUBST(ERTS)
 
185
AC_MSG_CHECKING([ERTS version])
 
186
[ERTS_VSN=`sed -n "s/^VSN[       ]*=[    ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
 
187
AC_MSG_RESULT([$ERTS_VSN])
 
188
AC_SUBST(ERTS_VSN)
130
189
 
 
190
AC_MSG_CHECKING([OTP release])
 
191
[OTP_REL=`sed -n "s/^SYSTEM_VSN[         ]*=[    ]*\(.*\)/\1/p" < $ERL_TOP/erts/vsn.mk`]
 
192
AC_MSG_RESULT([$OTP_REL])
 
193
AC_SUBST(OTP_REL)
131
194
 
132
195
AC_ARG_ENABLE(threads,
133
 
[  --enable-threads        enable async thread support
134
 
  --disable-threads       disable async thread support])
 
196
AS_HELP_STRING([--enable-threads], [enable async thread support])
 
197
AS_HELP_STRING([--disable-threads], [disable async thread support]))
 
198
 
 
199
AC_ARG_ENABLE(halfword-emulator,
 
200
AS_HELP_STRING([--enable-halfword-emulator],
 
201
               [enable halfword emulator (only for 64bit builds)]))
135
202
 
136
203
AC_ARG_ENABLE(smp-support,
137
 
[  --enable-smp-support    enable smp support
138
 
  --disable-smp-support   disable smp support])
 
204
AS_HELP_STRING([--enable-smp-support], [enable smp support])
 
205
AS_HELP_STRING([--disable-smp-support], [disable smp support]))
139
206
 
140
207
AC_ARG_WITH(termcap,
141
 
[  --with-termcap          use termcap (default)
142
 
  --without-termcap       do not use any termcap libraries (ncurses,curses,termcap,termlib)])
 
208
AS_HELP_STRING([--with-termcap], [use termcap (default)])
 
209
AS_HELP_STRING([--without-termcap],
 
210
               [do not use any termcap libraries (ncurses,curses,termcap,termlib)]))
143
211
 
144
212
AC_ARG_ENABLE(kernel-poll,
145
 
[  --enable-kernel-poll    enable kernel poll support])
 
213
AS_HELP_STRING([--enable-kernel-poll], [enable kernel poll support])
 
214
AS_HELP_STRING([--disable-kernel-poll], [disable kernel poll support]))
 
215
 
 
216
AC_ARG_ENABLE(sctp,
 
217
AS_HELP_STRING([--enable-sctp], [enable sctp support])
 
218
AS_HELP_STRING([--disable-sctp], [disable sctp support]))
146
219
 
147
220
AC_ARG_ENABLE(hipe,
148
 
[  --enable-hipe           enable hipe support
149
 
  --disable-hipe          disable hipe support])
 
221
AS_HELP_STRING([--enable-hipe], [enable hipe support])
 
222
AS_HELP_STRING([--disable-hipe], [disable hipe support]))
 
223
 
 
224
AC_ARG_ENABLE(native-libs,
 
225
AS_HELP_STRING([--enable-native-libs],
 
226
               [compile Erlang libraries to native code]))
 
227
 
 
228
AC_ARG_WITH(javac,
 
229
AS_HELP_STRING([--with-javac=JAVAC], [specify Java compiler to use])
 
230
AS_HELP_STRING([--with-javac], [use a Java compiler if found (default)])
 
231
AS_HELP_STRING([--without-javac], [don't use any Java compiler]))
150
232
 
151
233
AC_ARG_ENABLE(megaco_flex_scanner_lineno,
152
 
[  --enable-megaco-flex-scanner-lineno enable megaco flex scanner lineno
153
 
  --disable-megaco-flex-scanner-lineno disable megaco flex scanner lineno])
 
234
AS_HELP_STRING([--disable-megaco-flex-scanner-lineno],
 
235
               [disable megaco flex scanner lineno]))
154
236
 
155
237
AC_ARG_ENABLE(megaco_reentrant_flex_scanner,
156
 
[  --enable-megaco-reentrant-flex-scanner enable reentrans megaco flex scanner
157
 
  --disable-megaco-reentrant-flex-scanner disable reentrans megaco flex scanner])
 
238
AS_HELP_STRING([--disable-megaco-reentrant-flex-scanner],
 
239
               [disable reentrant megaco flex scanner]))
158
240
 
159
241
AC_ARG_WITH(ssl,
160
 
[  --with-ssl=PATH         specify location of OpenSSL include and lib
161
 
  --with-ssl              use SSL (default)
162
 
  --without-ssl           don't use SSL])
 
242
AS_HELP_STRING([--with-ssl=PATH], [specify location of OpenSSL include and lib])
 
243
AS_HELP_STRING([--with-ssl], [use SSL (default)])
 
244
AS_HELP_STRING([--without-ssl], [don't use SSL]))
163
245
 
164
246
AC_ARG_ENABLE(dynamic-ssl-lib,
165
 
[  --enable-dynamic-ssl-lib        force using dynamic openssl libraries
166
 
  --disable-dynamic-ssl-lib       disable using dynamic openssl libraries])
 
247
AS_HELP_STRING([--disable-dynamic-ssl-lib],
 
248
               [disable using dynamic openssl libraries]))
167
249
 
168
250
AC_ARG_ENABLE(shared-zlib,
169
 
[  --enable-shared-zlib        enable using shared zlib library
170
 
  --disable-shared-zlib       disable shared zlib, compile own zlib source (default)])
 
251
AS_HELP_STRING([--enable-shared-zlib], [enable using shared zlib library]))
171
252
 
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)
 
253
dnl This functionality has been lost along the way... :(
 
254
dnl It could perhaps be nice to reintroduce some day; therefore,
 
255
dnl it is not removed just commented out.
 
256
dnl
 
257
dnl #
 
258
dnl # Set Erlang man page directory
 
259
dnl #
 
260
dnl AC_ARG_ENABLE(erlang-mandir,
 
261
dnl [  --disable-erlang-mandir do not install Erlang man pages in a private directory],
 
262
dnl [ case "$enableval" in
 
263
dnl     no) erl_mandir=$mandir ;;
 
264
dnl     *)  erl_mandir='$(erlang_libdir)/man' ;;
 
265
dnl   esac ], erl_mandir='$(erlang_libdir)/man')
 
266
dnl AC_SUBST(erl_mandir)
182
267
 
183
268
AC_ARG_ENABLE(darwin-universal,
184
 
[  --enable-darwin-universal    build universal binaries on darwin i386],
 
269
AS_HELP_STRING([--enable-darwin-universal],
 
270
               [build universal binaries on darwin i386]),
185
271
[ case "$enableval" in
186
272
    no) enable_darwin_universal=no ;;
187
273
    *)  enable_darwin_univeral=yes ;;
190
276
 
191
277
 
192
278
AC_ARG_ENABLE(darwin-64bit,
193
 
[  --enable-darwin-64bit    build 64bit binaries on darwin],
 
279
AS_HELP_STRING([--enable-darwin-64bit], [build 64bit binaries on darwin]),
194
280
[ case "$enableval" in
195
281
    no) enable_darwin_64bit=no ;;
196
282
    *)  enable_darwin_64bit=yes ;;
198
284
],enable_darwin_64bit=no)
199
285
 
200
286
AC_ARG_ENABLE(m64-build,
201
 
[  --enable-m64-build    build 64bit binaries using the -m64 flag to (g)cc],
 
287
AS_HELP_STRING([--enable-m64-build],
 
288
               [build 64bit binaries using the -m64 flag to (g)cc]),
202
289
[ case "$enableval" in
203
290
    no) enable_m64_build=no ;;
204
291
    *)  enable_m64_build=yes ;;
205
292
  esac
206
293
],enable_m64_build=no)
207
294
 
 
295
AC_ARG_ENABLE(m32-build,
 
296
AS_HELP_STRING([--enable-m32-build],
 
297
               [build 32bit binaries using the -m32 flag to (g)cc]),
 
298
[ case "$enableval" in
 
299
    no) enable_m32_build=no ;;
 
300
    *)
 
301
        if test X${enable_darwin_64bit} = Xyes -o  X${enable_m64_build} = Xyes;
 
302
        then
 
303
                AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ;
 
304
        fi ;
 
305
        enable_m32_build=yes ;;
 
306
  esac
 
307
],enable_m32_build=no)
 
308
 
 
309
AC_ARG_ENABLE(ethread-pre-pentium4-compatibility,
 
310
              AS_HELP_STRING([--enable-ethread-pre-pentium4-compatibility],
 
311
                             [enable compatibility with x86 processors before pentium 4 (back to 486) in the ethread library]))
 
312
 
 
313
AC_ARG_WITH(libatomic_ops,
 
314
            AS_HELP_STRING([--with-libatomic_ops=PATH],
 
315
                           [specify and prefer usage of libatomic_ops in the ethread library]))
 
316
 
208
317
dnl OK, we might have darwin switches off different kinds, lets 
209
318
dnl check it all before continuing.
210
319
TMPSYS=`uname -s`-`uname -m`
248
357
        LDFLAGS="-m64 $LDFLAGS"
249
358
        export LDFLAGS
250
359
fi
 
360
if test X${enable_m32_build} = Xyes; then
 
361
        enable_hipe=no
 
362
        CFLAGS="-m32 $CFLAGS"
 
363
        export CFLAGS
 
364
        LDFLAGS="-m32 $LDFLAGS"
 
365
        export LDFLAGS
 
366
fi
251
367
 
252
368
export ERL_TOP
253
369
AC_CONFIG_SUBDIRS(lib erts)
254
370
 
255
 
AC_OUTPUT(Makefile)
 
371
AC_CONFIG_FILES([Makefile])
 
372
AC_CONFIG_FILES([make/emd2exml], [chmod +x make/emd2exml])
 
373
 
 
374
AC_OUTPUT
256
375
 
257
376
pattern="lib/*/SKIP"
258
377
files=`echo $pattern`
270
389
fi
271
390
pattern="lib/*/CONF_INFO"
272
391
files=`echo $pattern`
273
 
if test "$files" != "$pattern"; then
 
392
if test "$files" != "$pattern" || test -f erts/CONF_INFO; then
274
393
  echo '*********************************************************************'
275
394
  echo '**********************  APPLICATIONS INFORMATION  *******************'
276
395
  echo '*********************************************************************'
277
396
  echo
 
397
  test ! -f erts/CONF_INFO || files="$files erts/CONF_INFO"
278
398
  for infofile in $files; do
279
399
    app=`dirname $infofile`; app=`basename $app`
280
400
    printf "%-15s: " $app; cat $infofile
288
408
  echo '*********************************************************************'
289
409
  echo
290
410
  printf "%-15s: \n" documentation; 
 
411
  havexsltproc="yes"
291
412
  for cmd in `cat erts/doc/CONF_INFO`; do
292
413
        echo "                 $cmd is missing." 
 
414
  if test $cmd = "xsltproc"; then
 
415
    havexsltproc="no"
 
416
  fi
293
417
  done  
294
 
  echo '                 The documentation can not be built.'
 
418
  if test $havexsltproc = "no"; then
 
419
    echo '                 The documentation can not be built.'
 
420
  else
 
421
    echo '                 Using fakefop to generate placeholder PDF files.'
 
422
  fi
295
423
  echo
296
424
  echo '*********************************************************************'
297
425
fi