Mercurial > hg > octave-nkf
comparison configure.in @ 4110:b9238356dd07
[project @ 2002-10-17 16:14:44 by jwe]
author | jwe |
---|---|
date | Thu, 17 Oct 2002 16:14:45 +0000 |
parents | 92f4552ea359 |
children | c4ede5f4a03c |
comparison
equal
deleted
inserted
replaced
4109:6e20cac828cd | 4110:b9238356dd07 |
---|---|
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 | 21 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA |
22 ### 02111-1307, USA. | 22 ### 02111-1307, USA. |
23 | 23 |
24 AC_INIT | 24 AC_INIT |
25 AC_REVISION($Revision: 1.379 $) | 25 AC_REVISION($Revision: 1.380 $) |
26 AC_PREREQ(2.52) | 26 AC_PREREQ(2.52) |
27 AC_CONFIG_SRCDIR([src/octave.cc]) | 27 AC_CONFIG_SRCDIR([src/octave.cc]) |
28 AC_CONFIG_HEADER(config.h) | 28 AC_CONFIG_HEADER(config.h) |
29 | 29 |
30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) | 30 AC_DEFINE(OCTAVE_SOURCE, 1, [Define if this is Octave.]) |
573 ACX_BLAS([], [BLAS_DIR="blas"]) | 573 ACX_BLAS([], [BLAS_DIR="blas"]) |
574 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) | 574 ACX_LAPACK([BLAS_LIBS="$LAPACK_LIBS $BLAS_LIBS"], [LAPACK_DIR="lapack"]) |
575 AC_SUBST(BLAS_DIR) | 575 AC_SUBST(BLAS_DIR) |
576 AC_SUBST(LAPACK_DIR) | 576 AC_SUBST(LAPACK_DIR) |
577 | 577 |
578 ### Handle dynamic linking and shared library options. | 578 ### Handle shared library options. |
579 | |
580 ### Allow the user to experiment with dynamic linking using dlopen/dlsym. | |
581 | |
582 AC_ARG_ENABLE(dl, | |
583 [ --enable-dl use dlopen/dlsym for dynamic linking (not all systems)], | |
584 [if test "$enableval" = no; then WITH_DL=no; | |
585 elif test "$enableval" = yes; then WITH_DL=yes; | |
586 else WITH_DL=maybe; fi], | |
587 WITH_DL=maybe) | |
588 | |
589 ### Allow the user to experiment with dynamic linking using | |
590 ### shl_load/shl_findsym (HP/UX only?). | |
591 | |
592 AC_ARG_ENABLE(shl, | |
593 [ --enable-shl use shl_load/shl_findsym for dynamic linking (HP only)], | |
594 [if test "$enableval" = no; then WITH_SHL=no; | |
595 elif test "$enableval" = yes; then WITH_SHL=yes; | |
596 else WITH_SHL=maybe; fi], | |
597 WITH_SHL=maybe) | |
598 | 579 |
599 ### Enable creation of static libraries. | 580 ### Enable creation of static libraries. |
600 | 581 |
601 AC_ARG_ENABLE(static, | 582 AC_ARG_ENABLE(static, |
602 [ --enable-static create static libraries], | 583 [ --enable-static create static libraries], |
774 AC_SUBST(TEMPLATE_AR) | 755 AC_SUBST(TEMPLATE_AR) |
775 AC_SUBST(TEMPLATE_ARFLAGS) | 756 AC_SUBST(TEMPLATE_ARFLAGS) |
776 AC_SUBST(INCLUDE_LINK_DEPS) | 757 AC_SUBST(INCLUDE_LINK_DEPS) |
777 AC_SUBST(library_path_var) | 758 AC_SUBST(library_path_var) |
778 | 759 |
779 if $SHARED_LIBS; then | |
780 LIBOCTINTERP=-loctinterp$SHLLINKEXT | |
781 LIBOCTAVE=-loctave$SHLLINKEXT | |
782 LIBCRUFT=-lcruft$SHLLINKEXT | |
783 else | |
784 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' | |
785 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' | |
786 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' | |
787 fi | |
788 AC_SUBST(LIBOCTINTERP) | |
789 AC_SUBST(LIBOCTAVE) | |
790 AC_SUBST(LIBCRUFT) | |
791 | |
792 ### Allow compilation of smaller kernel. This only works if some form | |
793 ### of dynamic linking is also supported and used. | |
794 | |
795 AC_ARG_ENABLE(lite-kernel, | |
796 [ --enable-lite-kernel compile smaller kernel (requires dynamic linking)], | |
797 [if test "$enableval" = no; then OCTAVE_LITE=false; | |
798 else OCTAVE_LITE=true; fi], | |
799 OCTAVE_LITE=false) | |
800 if $OCTAVE_LITE; then | |
801 AC_DEFINE(OCTAVE_LITE, 1, [Define to compile smaller kernel.]) | |
802 fi | |
803 AC_SUBST(OCTAVE_LITE) | |
804 | |
805 ### special checks for odd OS specific things. | 760 ### special checks for odd OS specific things. |
806 ### | 761 ### |
807 ### I am told that on some SCO systems, the only place to find some | 762 ### I am told that on some SCO systems, the only place to find some |
808 ### functions like gethostname and gettimeofday is in libsocket. | 763 ### functions like gethostname and gettimeofday is in libsocket. |
809 | 764 |
920 stricmp strncasecmp strnicmp strptime symlink tempnam umask unlink \ | 875 stricmp strncasecmp strnicmp strptime symlink tempnam umask unlink \ |
921 usleep vfprintf vsprintf vsnprintf waitpid) | 876 usleep vfprintf vsprintf vsnprintf waitpid) |
922 | 877 |
923 OCTAVE_SMART_PUTENV | 878 OCTAVE_SMART_PUTENV |
924 | 879 |
880 ### Dynamic linking is now enabled only if we are building shared | |
881 ### libs and some API for dynamic linking is detected. | |
882 | |
925 LD_CXX='$(CXX)' | 883 LD_CXX='$(CXX)' |
926 LIBDLFCN= | 884 LIBDLFCN= |
927 DLFCN_INCFLAGS= | 885 DLFCN_INCFLAGS= |
928 RDYNAMIC_FLAG= | 886 RDYNAMIC_FLAG= |
929 if test "$WITH_DL" = yes || test "$WITH_DL" = maybe; then | 887 WITH_DYNAMIC_LINKING=false |
930 case "$canonical_host_type" in | 888 DL_API_MSG="" |
931 rs6000-ibm-aix* | powerpc-ibm-aix*) | 889 dlopen_api=false |
932 LIBDLFCN="-ldlfcn -ll -lld" | 890 shl_load_api=false |
933 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' | 891 loadlibrary_api=false |
934 WITH_DL=true | 892 if $SHARED_LIBS; then |
935 ;; | 893 |
936 i[[3456]]86-*-sco3.2v5*) | 894 LIBOCTINTERP=-loctinterp$SHLLINKEXT |
937 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' | 895 LIBOCTAVE=-loctave$SHLLINKEXT |
938 WITH_DL=true | 896 LIBCRUFT=-lcruft$SHLLINKEXT |
939 ;; | 897 |
940 *) | 898 AC_CHECK_LIB(dl, dlopen) |
941 AC_CHECK_LIB(dl, dlopen) | 899 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) |
942 AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose, [], [have_dl=false]) | 900 if test $ac_cv_func_dlclose = yes && test $ac_cv_func_dlerror = yes \ |
943 if test "x$have_dl" != xfalse; then | 901 && test $ac_cv_func_dlopen = yes && test $ac_cv_func_dlsym = yes; then |
944 WITH_DL=true | 902 dlopen_api=true |
903 else | |
904 AC_CHECK_LIB(dld, shl_load) | |
905 AC_CHECK_FUNCS(shl_load shl_findsym) | |
906 if test $ac_cv_func_shl_load = yes \ | |
907 && test $ac_cv_func_shl_findsym = yes; then | |
908 shl_load_api=true | |
909 else | |
910 AC_CHECK_LIB(wsock32, LoadLibrary) | |
911 AC_CHECK_FUNCS(LoadLibrary) | |
912 if test $ac_cv_func_loadlibrary = yes; then | |
913 loadlibrary_api=true | |
945 else | 914 else |
946 if test "$WITH_DL" = yes; then | 915 case "$canonical_host_type" in |
947 AC_MSG_ERROR([--enable-dl specified, but functions are missing!]) | 916 rs6000-ibm-aix* | powerpc-ibm-aix*) |
948 fi | 917 LIBDLFCN="-ldlfcn -ll -lld" |
949 WITH_DL=false | 918 DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' |
919 dlopen_api=true | |
920 ;; | |
921 i[[3456]]86-*-sco3.2v5*) | |
922 LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' | |
923 dlopen_api=true | |
924 ;; | |
925 esac | |
950 fi | 926 fi |
951 ;; | 927 fi |
952 esac | 928 fi |
953 if $WITH_DL; then | 929 |
930 if $dlopen_api; then | |
931 DL_API_MSG="(dlopen)" | |
932 AC_DEFINE(HAVE_DLOPEN_API, 1, [Define if your system has dlopen, dlsym, dlerror, and dlclose for dynamic linking]) | |
954 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) | 933 OCTAVE_CXX_FLAG(-rdynamic, [RDYNAMIC_FLAG=-rdynamic]) |
955 AC_DEFINE(WITH_DL, 1, [Define if using dlopen/dlsym.]) | 934 elif $shl_load_api; then |
935 DL_API_MSG="(shl_load)" | |
936 AC_DEFINE(HAVE_SHL_LOAD_API, 1, [Define if your system has shl_load and shl_findsym for dynamic linking]) | |
937 elif $loadlibrary_api; then | |
938 DL_API_MSG="(LoadLibrary)" | |
939 AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) | |
940 fi | |
941 | |
942 if $dlopen_api || $shl_load_api || $loadlibrary_api; then | |
943 WITH_DYNAMIC_LINKING=true | |
956 fi | 944 fi |
957 else | 945 else |
958 WITH_DL=false | 946 LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' |
959 fi | 947 LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' |
960 AC_SUBST(WITH_DL) | 948 LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' |
949 fi | |
950 AC_SUBST(LD_CXX) | |
961 AC_SUBST(LIBDLFCN) | 951 AC_SUBST(LIBDLFCN) |
962 AC_SUBST(DLFCN_INCFLAGS) | 952 AC_SUBST(DLFCN_INCFLAGS) |
963 AC_SUBST(RDYNAMIC_FLAG) | 953 AC_SUBST(RDYNAMIC_FLAG) |
964 AC_SUBST(LD_CXX) | |
965 | |
966 if test "$WITH_SHL" = yes || test "$WITH_SHL" = maybe; then | |
967 AC_CHECK_LIB(dld, shl_load) | |
968 AC_CHECK_FUNCS(shl_load shl_findsym, [], [have_shl=false]) | |
969 if test "x$have_shl" != xfalse; then | |
970 WITH_SHL=true | |
971 else | |
972 if test "$WITH_SHL" = yes; then | |
973 AC_MSG_ERROR([--enable-shl specified, but functions are missing!]) | |
974 fi | |
975 WITH_SHL=false | |
976 fi | |
977 if $WITH_SHL; then | |
978 AC_DEFINE(WITH_SHL, 1, [Define if using dld for dynamic linking.]) | |
979 fi | |
980 else | |
981 WITH_SHL=false | |
982 fi | |
983 AC_SUBST(WITH_SHL) | |
984 | |
985 ### Set WITH_DYNAMIC_LINKING after all the other shared library stuff | |
986 ### has been determined. | |
987 | |
988 if $WITH_DL || $WITH_SHL; then | |
989 AC_DEFINE(WITH_DYNAMIC_LINKING, 1, [Define if using dynamic linking.]) | |
990 WITH_DYNAMIC_LINKING=true | |
991 else | |
992 WITH_DYNAMIC_LINKING=false | |
993 fi | |
994 AC_SUBST(WITH_DYNAMIC_LINKING) | 954 AC_SUBST(WITH_DYNAMIC_LINKING) |
955 AC_SUBST(LIBOCTINTERP) | |
956 AC_SUBST(LIBOCTAVE) | |
957 AC_SUBST(LIBCRUFT) | |
995 | 958 |
996 ### There is more than one possible prototype for gettimeofday. See | 959 ### There is more than one possible prototype for gettimeofday. See |
997 ### which one (if any) appears in sys/time.h. These tests are from | 960 ### which one (if any) appears in sys/time.h. These tests are from |
998 ### Emacs 19. | 961 ### Emacs 19. |
999 | 962 |
1129 AC_TYPE_UID_T | 1092 AC_TYPE_UID_T |
1130 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) | 1093 AC_CHECK_TYPES([dev_t, ino_t, nlink_t, nlink_t]) |
1131 AC_CHECK_TYPES(sigset_t, , , [#include <signal.h>]) | 1094 AC_CHECK_TYPES(sigset_t, , , [#include <signal.h>]) |
1132 | 1095 |
1133 ### A system dependent kluge or two. | 1096 ### A system dependent kluge or two. |
1134 | |
1135 ### Extra libs needed when using the win32api | |
1136 case "$cannonical_host_type" in | |
1137 *-*-mingw*) | |
1138 LIBS="-lwsock32 $LIBS" | |
1139 ;; | |
1140 esac | |
1141 | 1097 |
1142 AC_CHECK_FUNCS(getrusage times) | 1098 AC_CHECK_FUNCS(getrusage times) |
1143 case "$canonical_host_type" in | 1099 case "$canonical_host_type" in |
1144 *-*-cygwin*) | 1100 *-*-cygwin*) |
1145 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) | 1101 AC_DEFINE(RUSAGE_TIMES_ONLY, 1, [Define if your struct rusage only has time information.]) |
1376 HDF5 libraries: $HDF5_LIBS | 1332 HDF5 libraries: $HDF5_LIBS |
1377 LIBS: $LIBS | 1333 LIBS: $LIBS |
1378 Default pager: $DEFAULT_PAGER | 1334 Default pager: $DEFAULT_PAGER |
1379 gnuplot: $GNUPLOT_BINARY | 1335 gnuplot: $GNUPLOT_BINARY |
1380 | 1336 |
1381 Do internal array bounds checking: $BOUNDS_CHECKING | 1337 Do internal array bounds checking: $BOUNDS_CHECKING |
1382 Build static libraries: $STATIC_LIBS | 1338 Build static libraries: $STATIC_LIBS |
1383 Build shared libraries: $SHARED_LIBS | 1339 Build shared libraries: $SHARED_LIBS |
1384 Minimal kernel option: $OCTAVE_LITE | 1340 Dynamic Linking: $WITH_DYNAMIC_LINKING $DL_API_MSG |
1385 Dynamic Linking (dlopen/dlsym): $WITH_DL | 1341 Include support for GNU readline: $USE_READLINE |
1386 Dynamic Linking (shl_load/shl_findsym): $WITH_SHL | |
1387 Include support for GNU readline: $USE_READLINE | |
1388 ]) | 1342 ]) |
1389 | 1343 |
1390 warn_msg_printed=false | 1344 warn_msg_printed=false |
1391 | 1345 |
1392 if test -n "$warn_f77_and_g77"; then | 1346 if test -n "$warn_f77_and_g77"; then |