comparison configure.in @ 1679:7dbdf23e1d18

[project @ 1995-12-30 03:32:34 by jwe]
author jwe
date Sat, 30 Dec 1995 03:32:34 +0000
parents 6e8ac624ed9b
children 0d952cd2ea74
comparison
equal deleted inserted replaced
1678:1ef83ee34815 1679:7dbdf23e1d18
18 ### 18 ###
19 ### You should have received a copy of the GNU General Public License 19 ### You should have received a copy of the GNU General Public License
20 ### along with Octave; see the file COPYING. If not, write to the Free 20 ### along with Octave; see the file COPYING. If not, write to the Free
21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 22
23 AC_REVISION($Revision: 1.145 $) 23 AC_REVISION($Revision: 1.146 $)
24 AC_PREREQ(2.0) 24 AC_PREREQ(2.0)
25 AC_INIT(src/octave.cc) 25 AC_INIT(src/octave.cc)
26 AC_CONFIG_HEADER(config.h) 26 AC_CONFIG_HEADER(config.h)
27 27
28 AC_DEFINE(OCTAVE_SOURCE, 1) 28 AC_DEFINE(OCTAVE_SOURCE, 1)
98 AC_SUBST(imagedir) 98 AC_SUBST(imagedir)
99 AC_SUBST(imagepath) 99 AC_SUBST(imagepath)
100 100
101 ### Path separator. 101 ### Path separator.
102 102
103 SEPCHAR=":" 103 AC_DEFINE(SEPCHAR, [':'])
104 AC_MSG_RESULT([defining SEPCHAR to be $SEPCHAR]) 104 AC_DEFINE(SEPCHAR_STR, [":"])
105 AC_DEFINE(SEPCHAR, [']$SEPCHAR['])
106 AC_DEFINE(SEPCHAR_STR, ["]$SEPCHAR["])
107 105
108 ### Allow the user to force us to use f2c. 106 ### Allow the user to force us to use f2c.
109 107
110 AC_ARG_WITH(f2c, 108 AC_ARG_WITH(f2c,
111 [ --with-f2c use f2c even if Fortran compiler is available], 109 [ --with-f2c use f2c even if Fortran compiler is available],
166 ### Allow the user disable support for command line editing using GNU 164 ### Allow the user disable support for command line editing using GNU
167 ### readline. 165 ### readline.
168 166
169 READLINE_DIR=readline 167 READLINE_DIR=readline
170 USE_READLINE=true 168 USE_READLINE=true
171 LIBREADLINE=../readline/libreadline.a 169 LIBREADLINE=-lreadline
172 AC_ARG_ENABLE(readline, 170 AC_ARG_ENABLE(readline,
173 [ --enable-readline use readline library (default is yes)], 171 [ --enable-readline use readline library (default is yes)],
174 [if test "$enableval" = no; then 172 [if test "$enableval" = no; then
175 USE_READLINE=false; 173 USE_READLINE=false;
176 LIBREADLINE=""; 174 LIBREADLINE="";
275 case "$canonical_host_type" in 273 case "$canonical_host_type" in
276 alpha-dec-osf1.3) 274 alpha-dec-osf1.3)
277 LD_STATIC_FLAG=-static 275 LD_STATIC_FLAG=-static
278 ;; 276 ;;
279 esac 277 esac
278 if test -n "$LD_STATIC_FLAG"; then
279 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG])
280 fi
281 AC_SUBST(LD_STATIC_FLAG)
280 282
281 ### Handle dynamic linking and shared library options. 283 ### Handle dynamic linking and shared library options.
282
283 ### Allow the user to experiment with dynamic linking using GNU dld.
284
285 DLD_DIR=
286 LIBDLD=
287 LIBOCTDLD='liboctdld.a'
288 LD_STATIC_FLAG=
289 AC_ARG_ENABLE(dld,
290 [ --enable-dld use DLD for dynamic linking (not all systems)],
291 [if test $enableval = no; then use_dld=false; else use_dld=true; fi],
292 use_dld=false)
293 if $use_dld; then
294 DLD_DIR=dld
295 LIBDLD='../dld/libdld.a'
296 LD_STATIC_FLAG=-static
297 AC_DEFINE(WITH_DLD, 1)
298 fi
299 AC_SUBST(use_dld)
300 284
301 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. 285 ### Allow the user to experiment with dynamic linking using dlopen/dlsym.
302 286
303 AC_ARG_ENABLE(dl, 287 AC_ARG_ENABLE(dl,
304 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)], 288 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)],
305 [if test $enableval = no; then use_dl=false; else use_dl=true; fi], 289 [if test $enableval = no; then WITH_DL=false; else WITH_DL=true; fi],
306 use_dl=false) 290 WITH_DL=false)
307 AC_SUBST(use_dl) 291 AC_SUBST(WITH_DL)
308 292
309 ### Allow the user to experiment with dynamic linking using 293 ### Allow the user to experiment with dynamic linking using
310 ### shl_load/shl_findsym (HP/UX only?). 294 ### shl_load/shl_findsym (HP/UX only?).
311 295
312 AC_ARG_ENABLE(shl, 296 AC_ARG_ENABLE(shl,
313 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only?)], 297 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only?)],
314 [if test $enableval = no; then use_shl=false; else use_shl=true; fi], 298 [if test $enableval = no; then WITH_SHL=false; else WITH_SHL=true; fi],
315 use_shl=false) 299 WITH_SHL=false)
316 AC_SUBST(use_shl) 300 AC_SUBST(WITH_SHL)
301
302 if $WITH_DL || $WITH_SHL; then
303 AC_DEFINE(WITH_DYNAMIC_LINKING, 1)
304 WITH_DYNAMIC_LINKING=true
305 else
306 WITH_DYNAMIC_LINKING=false
307 fi
308 AC_SUBST(WITH_DYNAMIC_LINKING)
317 309
318 ### Enable creation of shared libraries. Currently only works with 310 ### Enable creation of shared libraries. Currently only works with
319 ### gcc on some systems. 311 ### gcc on some systems.
320 312
321 AC_ARG_ENABLE(shared, 313 AC_ARG_ENABLE(shared,
322 [ --shared create shared libraries (not all systems)], 314 [ --shared create shared libraries (not all systems)],
323 [if test $enableval = no; then shared_libs=false; else shared_libs=true; fi], 315 [if test $enableval = no; then SHARED_LIBS=false; else SHARED_LIBS=true; fi],
324 shared_libs=false) 316 SHARED_LIBS=false)
325 AC_SUBST(shared_libs) 317 AC_SUBST(SHARED_LIBS)
326 318
327 if $shared_libs; then 319 if $SHARED_LIBS; then
328 CPICFLAG=-fPIC 320 CPICFLAG=-fPIC
329 CXXPICFLAG=-fPIC 321 CXXPICFLAG=-fPIC
330 FPICFLAG=-fPIC 322 FPICFLAG=-fPIC
331 case "$cannonical_host_type" in 323 SHLEXT=so
332 alpha-dec-osf* | rs6000-ibm-aix*) 324 RLD_FLAG='-rpath $(libdir)'
325 case "$canonical_host_type" in
326 alpha-dec-osf*)
327 CPICFLAG=
328 CXXPICFLAG=
329 FPICFLAG=
330 ;;
331 rs6000-ibm-aix*)
333 CPICFLAG= 332 CPICFLAG=
334 CXXPICFLAG= 333 CXXPICFLAG=
335 FPICFLAG= 334 FPICFLAG=
336 ;; 335 ;;
337 hppa*-hp-hpux*) 336 hppa*-hp-hpux*)
338 FPICFLAG=+Z 337 FPICFLAG=+Z
338 SHLEXT=sl
339 RLD_FLAG='-Xlinker +b -Xlinker $(libdir)'
339 ;; 340 ;;
340 *-sgi-*) 341 *-sgi-*)
341 FPICFLAG=-KPIC 342 FPICFLAG=-KPIC
342 ;; 343 ;;
343 sparc-sun-sunos*) 344 sparc-sun-sunos4*)
344 FPICFLAG=-PIC 345 FPICFLAG=-PIC
346 RLD_FLAG='-L $(libdir)'
347 ;;
348 sparc-sun-sunos5*)
349 FPICFLAG=-PIC
350 RLD_FLAG='-Xlinker -R -Xlinker $(libdir)'
345 ;; 351 ;;
346 esac 352 esac
347 else 353 else
348 FPICFLAG= 354 FPICFLAG=
349 CPICFLAG= 355 CPICFLAG=
350 CXXPICFLAG= 356 CXXPICFLAG=
357 SHLEXT=
358 RLD_FLAG=
351 fi 359 fi
352 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG]) 360 AC_MSG_RESULT([defining FPICFLAG to be $FPICFLAG])
353 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG]) 361 AC_MSG_RESULT([defining CPICFLAG to be $CPICFLAG])
354 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG]) 362 AC_MSG_RESULT([defining CXXPICFLAG to be $CXXPICFLAG])
363 AC_MSG_RESULT([defining SHLEXT to be $SHLEXT])
355 AC_SUBST(FPICFLAG) 364 AC_SUBST(FPICFLAG)
356 AC_SUBST(CPICFLAG) 365 AC_SUBST(CPICFLAG)
357 AC_SUBST(CXXPICFLAG) 366 AC_SUBST(CXXPICFLAG)
367 AC_SUBST(SHLEXT)
368 AC_SUBST(RLD_FLAG)
358 369
359 ### Allow compilation of smaller kernel. This only works if some form 370 ### Allow compilation of smaller kernel. This only works if some form
360 ### of dynamic linking is also supported and used. 371 ### of dynamic linking is also supported and used.
361 372
362 AC_ARG_ENABLE(lite-kernel, 373 AC_ARG_ENABLE(lite-kernel,
363 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)], 374 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)],
364 [if test $enableval = no; then lite_kernel=false; else lite_kernel=true; fi], 375 [if test $enableval = no; then OCTAVE_LITE=false; else OCTAVE_LITE=true; fi],
365 lite_kernel=false) 376 OCTAVE_LITE=false)
366 if $lite_kernel; then 377 if $OCTAVE_LITE; then
367 LIBOCTDLD=
368 AC_DEFINE(OCTAVE_LITE, 1) 378 AC_DEFINE(OCTAVE_LITE, 1)
369 fi 379 fi
370 AC_SUBST(lite_kernel) 380 AC_SUBST(OCTAVE_LITE)
371 381
372 if test -n "$DLD_DIR"; then 382 ### special checks for odd OS specific things.
373 AC_MSG_RESULT([defining DLD_DIR to be $DLD_DIR])
374 fi
375 if test -n "$LIBDLD"; then
376 AC_MSG_RESULT([defining LIBDLD to be $LIBDLD])
377 fi
378 if test -n "$LIBOCTDLD"; then
379 AC_MSG_RESULT([defining LIBOCTDLD to be $LIBOCTDLD])
380 fi
381 if test -n "$LD_STATIC_FLAG"; then
382 AC_MSG_RESULT([defining LD_STATIC_FLAG to be $LD_STATIC_FLAG])
383 fi
384 AC_SUBST(DLD_DIR)
385 AC_SUBST(LIBDLD)
386 AC_SUBST(LIBOCTDLD)
387 AC_SUBST(LD_STATIC_FLAG)
388
389 ### Special checks for odd OS specific things.
390 383
391 AC_ISC_POSIX 384 AC_ISC_POSIX
392 AC_MINIX 385 AC_MINIX
393 AC_AIX 386 AC_AIX
394 AC_CHECK_LIB(sun, getpwnam) 387 AC_CHECK_LIB(sun, getpwnam)
495 have_f2c=true 488 have_f2c=true
496 fi 489 fi
497 fi 490 fi
498 fi 491 fi
499 492
500 fortran_rules_frag=Makerules.f77 493 f77_rules_frag=Makerules.f77
501 if $have_fortran_compiler; then 494 if $have_fortran_compiler; then
502 cat << \EOF > $fortran_rules_frag 495 changequote(,)dnl
496 cat << \EOF > $f77_rules_frag
503 497
504 .c.f: 498 .c.f:
505 499
506 .f.o: 500 .f.o:
507 if [ -z "$(FPICFLAG)" ] && [ -f pic ]; then \ 501 [ -z "$(FPICFLAG)" ] || \
508 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o pic/$@; \ 502 $(FC) -c $(FPICFLAG) $(ALL_FFLAGS) $< -o pic/$@
509 else true; fi 503 $(FC) -c $(ALL_FFLAGS) $<
510 $(FC) -c $(ALL_FFLAGS) $<'
511 504
512 EOF 505 EOF
506 changequote([,])dnl
513 elif $have_f2c; then 507 elif $have_f2c; then
514 AC_DEFINE(F77_APPEND_UNDERSCORE, 1) 508 AC_DEFINE(F77_APPEND_UNDERSCORE, 1)
515 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1]) 509 AC_MSG_RESULT([defining F77_APPEND_UNDERSCORE to be 1])
516 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, []) 510 AC_CHECK_LIB(f2c, main, FLIBS=-lf2c, [])
517 if test -z "$FLIBS"; then 511 if test -z "$FLIBS"; then
521 fi 515 fi
522 fi 516 fi
523 if test -z "$FLIBS"; then 517 if test -z "$FLIBS"; then
524 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a]) 518 AC_MSG_WARN([I found f2c but not libf2c.a, or libF77.a and libI77.a])
525 fi 519 fi
526 cat << \EOF > $fortran_rules_frag 520 f77_rules_frag=Makerules.f77
521 cat << \EOF > $f77_rules_frag
527 522
528 .c.f: 523 .c.f:
529 cat $< | $(F2C) $(F2CFLAGS) > $(@F) 524 cat $< | $(F2C) $(F2CFLAGS) > $(@F)
530 525
531 %.o : %.f 526 .o.f
532 527
533 EOF 528 EOF
534 else 529 else
535 AC_MSG_WARN([in order to build octave, you must have a compatible]) 530 AC_MSG_WARN([in order to build octave, you must have a compatible])
536 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.]) 531 AC_MSG_WARN([Fortran compiler or f2c installed and in your path.])
543 AC_SUBST(FFLAGS) 538 AC_SUBST(FFLAGS)
544 AC_SUBST(FUGLY) 539 AC_SUBST(FUGLY)
545 AC_SUBST(FLIBS) 540 AC_SUBST(FLIBS)
546 AC_SUBST(F2C) 541 AC_SUBST(F2C)
547 AC_SUBST(F2CFLAGS) 542 AC_SUBST(F2CFLAGS)
548 AC_SUBST_FILE(fortran_rules_frag) 543 AC_SUBST_FILE(f77_rules_frag)
549 544
550 ### Extract libraries and directories from FLIBS and CXXLIBS. 545 ### Extract libraries and directories from FLIBS and CXXLIBS.
551 ### 546 ###
552 ### Leave only libraries, with -lfoo converted to libfoo.a: 547 ### Leave only libraries, with -lfoo converted to libfoo.a:
553 548
654 if test "$ac_cv_func_dlopen" = yes \ 649 if test "$ac_cv_func_dlopen" = yes \
655 && test "$ac_cv_func_dlopen" = yes \ 650 && test "$ac_cv_func_dlopen" = yes \
656 && test "$ac_cv_func_dlsym" = yes \ 651 && test "$ac_cv_func_dlsym" = yes \
657 && test "$ac_cv_func_dlerror" = yes \ 652 && test "$ac_cv_func_dlerror" = yes \
658 && test "$ac_cv_func_dlclose" = yes; then 653 && test "$ac_cv_func_dlclose" = yes; then
659 use_dl=true 654 WITH_DL=true
660 elif $use_dl; then 655 elif $WITH_DL; then
661 AC_MSG_ERROR([--enable-dl specified, but required functions are missing!]) 656 AC_MSG_ERROR([--enable-dl specified, but required functions are missing!])
662 fi 657 fi
663 658
664 if $use_dl; then 659 if $WITH_DL; then
665 AC_DEFINE(WITH_DL, 1) 660 AC_DEFINE(WITH_DL, 1)
666 fi 661 fi
667 662
668 AC_CHECK_LIB(dld, shl_load) 663 AC_CHECK_LIB(dld, shl_load)
669 AC_CHECK_FUNCS(shl_load shl_findsym) 664 AC_CHECK_FUNCS(shl_load shl_findsym)
670 665
671 if test "$ac_cv_func_shl_load" = yes \ 666 if test "$ac_cv_func_shl_load" = yes \
672 && test "$ac_cv_func_shl_findsym" = yes; then 667 && test "$ac_cv_func_shl_findsym" = yes; then
673 use_shl=true 668 WITH_SHL=true
674 elif $use_shl; then 669 elif $WITH_SHL; then
675 AC_MSG_ERROR([--enable-shl specified, but required functions are missing!]) 670 AC_MSG_ERROR([--enable-shl specified, but required functions are missing!])
676 fi 671 fi
677 672
678 if $use_shl; then 673 if $WITH_SHL; then
679 AC_DEFINE(WITH_SHL, 1) 674 AC_DEFINE(WITH_SHL, 1)
680 fi 675 fi
681 676
682 ### There is more than one possible prototype for gettimeofday. See 677 ### There is more than one possible prototype for gettimeofday. See
683 ### which one (if any) appears in sys/time.h. 678 ### which one (if any) appears in sys/time.h.
955 Use GNU readline: $USE_READLINE 950 Use GNU readline: $USE_READLINE
956 Use GNU info reader: $USE_GNU_INFO 951 Use GNU info reader: $USE_GNU_INFO
957 Default pager: $DEFAULT_PAGER 952 Default pager: $DEFAULT_PAGER
958 gnuplot: $GNUPLOT_BINARY 953 gnuplot: $GNUPLOT_BINARY
959 954
960 Build shared libraries: $shared_libs 955 Build shared libraries: $SHARED_LIBS
961 Minimal kernel option: $lite_kernel 956 Minimal kernel option: $OCTAVE_LITE
962 Dynamic Linking (dld): $use_dld 957 Dynamic Linking (dlopen/dlsym): $WITH_DL
963 Dynamic Linking (dlopen/dlsym): $use_dl 958 Dynamic Linking (shl_load/shl_findsym): $WITH_SHL
964 Dynamic Linking (shl_load/shl_findsym): $use_shl
965 ]) 959 ])