Mercurial > hg > octave-avbm
comparison aclocal.m4 @ 2831:19c45d29f177
[project @ 1997-03-26 04:17:16 by jwe]
author | jwe |
---|---|
date | Wed, 26 Mar 1997 04:18:15 +0000 |
parents | d45d48b3dcde |
children | 8b262e771614 |
comparison
equal
deleted
inserted
replaced
2830:10a8198b1733 | 2831:19c45d29f177 |
---|---|
56 else | 56 else |
57 $3 | 57 $3 |
58 fi | 58 fi |
59 fi | 59 fi |
60 fi]) | 60 fi]) |
61 dnl | |
62 dnl | |
63 dnl See what libraries are used by the C++ compiler. Need this for | |
64 dnl dynamic linking. | |
65 dnl | |
66 dnl Write a minimal program and compile it with -v. I don't know what | |
67 dnl to do if your compiler doesn't have -v... | |
68 dnl | |
69 dnl OCTAVE_CXXLIBS() | |
70 AC_DEFUN(OCTAVE_CXXLIBS, | |
71 [AC_REQUIRE([AC_PROG_CXXCPP]) | |
72 AC_REQUIRE([AC_PROG_CXX]) | |
73 AC_MSG_CHECKING([for C++ libraries]) | |
74 AC_CACHE_VAL(octave_cv_cxxlibs, | |
75 [AC_LANG_SAVE | |
76 AC_LANG_CPLUSPLUS | |
77 XCXXFLAGS="$CXXFLAGS" | |
78 CXXFLAGS="$XCXXFLAGS -v" | |
79 export CXXFLAGS | |
80 dnl | |
81 dnl This may be too tricky and break with future autoconf releases, | |
82 dnl but it works with version 2.3, even with the Ultrix /bin/sh. | |
83 dnl | |
84 dnl I don't think that stripping commas out of this will ever hurt. | |
85 dnl | |
86 coutput=`( AC_TRY_LINK([], [], []) ) AC_FD_CC>&1 | sed 's/,/ /g'` | |
87 CXXFLAGS="$XCXXFLAGS" | |
88 AC_LANG_RESTORE | |
89 changequote(, )dnl | |
90 dnl | |
91 octave_cv_cxxlibs= | |
92 lflags= | |
93 want_arg= | |
94 dnl | |
95 for arg in $coutput; do | |
96 if test x$want_arg = x; then | |
97 want_arg= | |
98 case $arg in | |
99 /*.a) | |
100 exists=false | |
101 for f in $lflags; do | |
102 if test x$arg = x$f; then | |
103 exists=true | |
104 fi | |
105 done | |
106 if $exists; then | |
107 arg= | |
108 else | |
109 lflags="$lflags $arg" | |
110 fi | |
111 ;; | |
112 -[LR]*) | |
113 exists=false | |
114 for f in $lflags; do | |
115 if test x$arg = x$f; then | |
116 exists=true | |
117 fi | |
118 done | |
119 ;; | |
120 -l*) | |
121 if test x$arg = x-lang-c++; then | |
122 arg= | |
123 else | |
124 lflags="$lflags $arg" | |
125 fi | |
126 ;; | |
127 -u) | |
128 want_arg=$arg | |
129 ;; | |
130 *) | |
131 arg= | |
132 ;; | |
133 esac | |
134 else | |
135 want_arg= | |
136 fi | |
137 if test x$arg != x; then | |
138 octave_cv_cxxlibs="$octave_cv_cxxlibs $arg" | |
139 fi | |
140 done | |
141 dnl | |
142 changequote([, ])]) | |
143 AC_MSG_RESULT([$octave_cv_cxxlibs]) | |
144 CXXLIBS="$octave_cv_cxxlibs" | |
145 AC_SUBST(CXXLIBS)]) | |
146 dnl | 61 dnl |
147 dnl See what libraries are used by the Fortran compiler. | 62 dnl See what libraries are used by the Fortran compiler. |
148 dnl | 63 dnl |
149 dnl Write a minimal program and compile it with -v. I don't know what | 64 dnl Write a minimal program and compile it with -v. I don't know what |
150 dnl to do if your compiler doesn't have -v... | 65 dnl to do if your compiler doesn't have -v... |