annotate common/autoconf/libraries.m4 @ 20363:fa7663fc5d50

8001931: The new build system whitespace cleanup Reviewed-by: tbell, simonis, erikj
author ihse
date Thu, 10 Oct 2013 14:58:19 +0200
parents 51009a053562
children 47ddc69a25a7
rev   line source
erikj@13133 1 #
erikj@13133 2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
erikj@13133 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
erikj@13133 4 #
erikj@13133 5 # This code is free software; you can redistribute it and/or modify it
erikj@13133 6 # under the terms of the GNU General Public License version 2 only, as
erikj@13133 7 # published by the Free Software Foundation. Oracle designates this
erikj@13133 8 # particular file as subject to the "Classpath" exception as provided
erikj@13133 9 # by Oracle in the LICENSE file that accompanied this code.
erikj@13133 10 #
erikj@13133 11 # This code is distributed in the hope that it will be useful, but WITHOUT
erikj@13133 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
erikj@13133 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
erikj@13133 14 # version 2 for more details (a copy is included in the LICENSE file that
erikj@13133 15 # accompanied this code).
erikj@13133 16 #
erikj@13133 17 # You should have received a copy of the GNU General Public License version
erikj@13133 18 # 2 along with this work; if not, write to the Free Software Foundation,
erikj@13133 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
erikj@13133 20 #
erikj@13133 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
erikj@13133 22 # or visit www.oracle.com if you need additional information or have any
erikj@13133 23 # questions.
erikj@13133 24 #
erikj@13133 25
erikj@13133 26 AC_DEFUN_ONCE([LIB_SETUP_INIT],
erikj@13133 27 [
ihse@20363 28
ihse@20363 29 ###############################################################################
ihse@20363 30 #
ihse@20363 31 # OS specific settings that we never will need to probe.
ihse@20363 32 #
ihse@20363 33 if test "x$OPENJDK_TARGET_OS" = xlinux; then
erikj@13133 34 AC_MSG_CHECKING([what is not needed on Linux?])
erikj@13133 35 PULSE_NOT_NEEDED=yes
erikj@13133 36 AC_MSG_RESULT([pulse])
ihse@20363 37 fi
erikj@13133 38
ihse@20363 39 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
erikj@13133 40 AC_MSG_CHECKING([what is not needed on Solaris?])
erikj@13133 41 ALSA_NOT_NEEDED=yes
erikj@13133 42 PULSE_NOT_NEEDED=yes
erikj@13133 43 AC_MSG_RESULT([alsa pulse])
ihse@20363 44 fi
erikj@13133 45
ihse@20363 46 if test "x$OPENJDK_TARGET_OS" = xwindows; then
erikj@13133 47 AC_MSG_CHECKING([what is not needed on Windows?])
ihse@20363 48 CUPS_NOT_NEEDED=yes
erikj@13133 49 ALSA_NOT_NEEDED=yes
erikj@13133 50 PULSE_NOT_NEEDED=yes
erikj@13133 51 X11_NOT_NEEDED=yes
erikj@13133 52 AC_MSG_RESULT([alsa cups pulse x11])
ihse@20363 53 fi
erikj@13133 54
ihse@20363 55 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
erikj@13133 56 AC_MSG_CHECKING([what is not needed on MacOSX?])
erikj@13133 57 ALSA_NOT_NEEDED=yes
erikj@13133 58 PULSE_NOT_NEEDED=yes
erikj@13133 59 X11_NOT_NEEDED=yes
ihse@20363 60 FREETYPE2_NOT_NEEDED=yes
erikj@13133 61 # If the java runtime framework is disabled, then we need X11.
erikj@13133 62 # This will be adjusted below.
erikj@13133 63 AC_MSG_RESULT([alsa pulse x11])
ihse@20363 64 fi
erikj@13133 65
ihse@20363 66 if test "x$OPENJDK_TARGET_OS" = xbsd; then
erikj@13133 67 AC_MSG_CHECKING([what is not needed on bsd?])
erikj@13133 68 ALSA_NOT_NEEDED=yes
ihse@20363 69 AC_MSG_RESULT([alsa])
ihse@20363 70 fi
erikj@13133 71
ihse@20363 72 if test "x$OPENJDK" = "xfalse"; then
erikj@13133 73 FREETYPE2_NOT_NEEDED=yes
ihse@20363 74 fi
erikj@13133 75
ihse@20363 76 if test "x$SUPPORT_HEADFUL" = xno; then
ohair@13697 77 X11_NOT_NEEDED=yes
ihse@20363 78 fi
ohair@13697 79
ihse@20363 80 ###############################################################################
ihse@20363 81 #
ihse@20363 82 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
ihse@20363 83 # that uses this API.
ihse@20363 84 #
ihse@20363 85 AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support],
ihse@20363 86 [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])],
ihse@20363 87 [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"])
erikj@13133 88
ihse@20363 89 USE_MACOSX_RUNTIME_SUPPORT=no
ihse@20363 90 AC_MSG_CHECKING([for explicit Java runtime support in the OS])
ihse@20363 91 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
erikj@13133 92 if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
ihse@20363 93 MACOSX_RUNTIME_SUPPORT=yes
ihse@20363 94 USE_MACOSX_RUNTIME_SUPPORT=yes
ihse@20363 95 AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11])
erikj@13133 96 else
ihse@20363 97 AC_MSG_RESULT([yes, but explicitly disabled.])
erikj@13133 98 fi
ihse@20363 99 else
erikj@13133 100 AC_MSG_RESULT([no])
ihse@20363 101 fi
erikj@13133 102
ihse@20363 103 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
erikj@13133 104 AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?])
erikj@13133 105 X11_NOT_NEEDED=
erikj@13133 106 FREETYPE2_NOT_NEEDED=
erikj@13133 107 AC_MSG_RESULT([alsa pulse])
ihse@20363 108 fi
erikj@13133 109 ])
erikj@13133 110
erikj@13133 111 AC_DEFUN_ONCE([LIB_SETUP_X11],
erikj@13133 112 [
erikj@13133 113
ihse@20363 114 ###############################################################################
ihse@20363 115 #
ihse@20363 116 # Check for X Windows
ihse@20363 117 #
erikj@13133 118
ihse@20363 119 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
ihse@20363 120 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
ihse@20363 121 # --x-libraries for the sysroot, if that seems to be correct.
ihse@20363 122 if test "x$SYS_ROOT" != "x/"; then
ihse@20363 123 if test "x$x_includes" = xNONE; then
ihse@20363 124 if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
ihse@20363 125 x_includes="$SYS_ROOT/usr/X11R6/include"
ihse@20363 126 elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
ihse@20363 127 x_includes="$SYS_ROOT/usr/include"
ihse@20363 128 fi
ihse@20363 129 fi
ihse@20363 130 if test "x$x_libraries" = xNONE; then
ihse@20363 131 if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
ihse@20363 132 x_libraries="$SYS_ROOT/usr/X11R6/lib"
ihse@20363 133 elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
ihse@20363 134 x_libraries="$SYS_ROOT/usr/lib64"
ihse@20363 135 elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
ihse@20363 136 x_libraries="$SYS_ROOT/usr/lib"
ihse@20363 137 fi
erikj@13133 138 fi
erikj@13133 139 fi
ihse@20363 140
ihse@20363 141 # Now let autoconf do it's magic
ihse@20363 142 AC_PATH_X
ihse@20363 143 AC_PATH_XTRA
ihse@20363 144
ihse@20363 145 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
ihse@20363 146 # this doesn't make sense so we remove it.
ihse@20363 147 if test "x$COMPILE_TYPE" = xcross; then
ihse@20363 148 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
ihse@20363 149 fi
ihse@20363 150
ihse@20363 151 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
ihse@20363 152 HELP_MSG_MISSING_DEPENDENCY([x11])
ihse@20363 153 AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
ihse@20363 154 fi
ihse@20363 155
ihse@20363 156 # Some of the old makefiles require a setting of OPENWIN_HOME
ihse@20363 157 # Since the X11R6 directory has disappeared on later Linuxes,
ihse@20363 158 # we need to probe for it.
ihse@20363 159 if test "x$OPENJDK_TARGET_OS" = xlinux; then
ihse@20363 160 if test -d "$SYS_ROOT/usr/X11R6"; then
ihse@20363 161 OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
ihse@20363 162 elif test -d "$SYS_ROOT/usr/include/X11"; then
ihse@20363 163 OPENWIN_HOME="$SYS_ROOT/usr"
erikj@13133 164 fi
erikj@13133 165 fi
ihse@20363 166 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
ihse@20363 167 OPENWIN_HOME="/usr/openwin"
ihse@20363 168 fi
ihse@20363 169 AC_SUBST(OPENWIN_HOME)
erikj@13133 170
erikj@13133 171
ihse@20363 172 #
ihse@20363 173 # Weird Sol10 something check...TODO change to try compile
ihse@20363 174 #
ihse@20363 175 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
ihse@20363 176 if test "`uname -r`" = "5.10"; then
ihse@20363 177 if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
ihse@20363 178 X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
ihse@20363 179 fi
ihse@20363 180 fi
ihse@20363 181 fi
erikj@15178 182
ihse@20363 183 AC_LANG_PUSH(C)
ihse@20363 184 OLD_CFLAGS="$CFLAGS"
ihse@20363 185 CFLAGS="$CFLAGS $X_CFLAGS"
erikj@13133 186
ihse@20363 187 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
ihse@20363 188 AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
ihse@20363 189 [X11_A_OK=yes],
ihse@20363 190 [X11_A_OK=no; break],
ihse@20363 191 [
ihse@20363 192 # include <X11/Xlib.h>
ihse@20363 193 # include <X11/Xutil.h>
ihse@20363 194 ]
ihse@20363 195 )
erikj@13133 196
ihse@20363 197 CFLAGS="$OLD_CFLAGS"
ihse@20363 198 AC_LANG_POP(C)
erikj@13133 199
ihse@20363 200 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
erikj@13133 201 HELP_MSG_MISSING_DEPENDENCY([x11])
erikj@19524 202 AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG])
ihse@20363 203 fi
erikj@13133 204
ihse@20363 205 AC_SUBST(X_CFLAGS)
ihse@20363 206 AC_SUBST(X_LIBS)
erikj@13133 207 ])
erikj@13133 208
erikj@13133 209 AC_DEFUN_ONCE([LIB_SETUP_CUPS],
erikj@13133 210 [
erikj@13133 211
ihse@20363 212 ###############################################################################
ihse@20363 213 #
ihse@20363 214 # The common unix printing system cups is used to print from java.
ihse@20363 215 #
ihse@20363 216 AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups],
ihse@20363 217 [specify prefix directory for the cups package
ihse@20363 218 (expecting the headers under PATH/include)])])
ihse@20363 219 AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include],
ihse@20363 220 [specify directory for the cups include files])])
erikj@13133 221
ihse@20363 222 if test "x$CUPS_NOT_NEEDED" = xyes; then
ihse@20363 223 if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
ihse@20363 224 AC_MSG_WARN([cups not used, so --with-cups is ignored])
ihse@20363 225 fi
ihse@20363 226 CUPS_CFLAGS=
ihse@20363 227 else
ihse@20363 228 CUPS_FOUND=no
erikj@13133 229
ihse@20363 230 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
ihse@20363 231 AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.])
ihse@20363 232 fi
erikj@13133 233
ihse@20363 234 if test "x${with_cups}" != x; then
ihse@20363 235 CUPS_CFLAGS="-I${with_cups}/include"
ihse@20363 236 CUPS_FOUND=yes
ihse@20363 237 fi
ihse@20363 238 if test "x${with_cups_include}" != x; then
ihse@20363 239 CUPS_CFLAGS="-I${with_cups_include}"
ihse@20363 240 CUPS_FOUND=yes
ihse@20363 241 fi
ihse@20363 242 if test "x$CUPS_FOUND" = xno; then
ihse@20363 243 BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
ihse@20363 244 fi
ihse@20363 245 if test "x$CUPS_FOUND" = xno; then
ihse@20363 246 # Are the cups headers installed in the default /usr/include location?
ihse@20363 247 AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
ihse@20363 248 [
ihse@20363 249 CUPS_FOUND=yes
ihse@20363 250 CUPS_CFLAGS=
ihse@20363 251 DEFAULT_CUPS=yes
ihse@20363 252 ]
ihse@20363 253 )
ihse@20363 254 fi
ihse@20363 255 if test "x$CUPS_FOUND" = xno; then
ihse@20363 256 # Getting nervous now? Lets poke around for standard Solaris third-party
ihse@20363 257 # package installation locations.
ihse@20363 258 AC_MSG_CHECKING([for cups headers])
ihse@20363 259 if test -s /opt/sfw/cups/include/cups/cups.h; then
ihse@20363 260 # An SFW package seems to be installed!
ihse@20363 261 CUPS_FOUND=yes
ihse@20363 262 CUPS_CFLAGS="-I/opt/sfw/cups/include"
ihse@20363 263 elif test -s /opt/csw/include/cups/cups.h; then
ihse@20363 264 # A CSW package seems to be installed!
ihse@20363 265 CUPS_FOUND=yes
ihse@20363 266 CUPS_CFLAGS="-I/opt/csw/include"
ihse@20363 267 fi
ihse@20363 268 AC_MSG_RESULT([$CUPS_FOUND])
ihse@20363 269 fi
ihse@20363 270 if test "x$CUPS_FOUND" = xno; then
ihse@20363 271 HELP_MSG_MISSING_DEPENDENCY([cups])
ihse@20363 272 AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
ihse@20363 273 fi
ihse@20363 274 fi
erikj@13133 275
ihse@20363 276 AC_SUBST(CUPS_CFLAGS)
erikj@13133 277
erikj@13133 278 ])
erikj@13133 279
erikj@13133 280 AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
erikj@13133 281 [
erikj@13133 282
ihse@20363 283 ###############################################################################
ihse@20363 284 #
ihse@20363 285 # The ubiquitous freetype2 library is used to render fonts.
ihse@20363 286 #
ihse@20363 287 AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype],
ihse@20363 288 [specify prefix directory for the freetype2 package
ihse@20363 289 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
erikj@13133 290
ihse@20363 291 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
ihse@20363 292 USING_SYSTEM_FT_LIB=false
erikj@13133 293
ihse@20363 294 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
ihse@20363 295 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
ihse@20363 296 AC_MSG_WARN([freetype not used, so --with-freetype is ignored])
ihse@20363 297 fi
ihse@20363 298 FREETYPE2_CFLAGS=
ihse@20363 299 FREETYPE2_LIBS=
ihse@20363 300 FREETYPE2_LIB_PATH=
ihse@20363 301 else
ihse@20363 302 FREETYPE2_FOUND=no
erikj@13133 303
ihse@20363 304 if test "x$with_freetype" != x; then
ihse@20363 305 BASIC_FIXUP_PATH(with_freetype)
ihse@20363 306 FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
ihse@20363 307 FREETYPE2_LIB_PATH="$with_freetype/lib"
ihse@20363 308 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
ihse@20363 309 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
ihse@20363 310 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
ihse@20363 311 fi
ihse@20363 312 if test "x$OPENJDK_TARGET_OS" = xwindows; then
ihse@20363 313 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
ihse@20363 314 fi
ihse@20363 315 FREETYPE2_CFLAGS="-I$with_freetype/include"
ihse@20363 316 if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
ihse@20363 317 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
ihse@20363 318 fi
ihse@20363 319 FREETYPE2_FOUND=yes
ihse@20363 320 if test "x$FREETYPE2_FOUND" = xyes; then
ihse@20363 321 # Verify that the directories exist
ihse@20363 322 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
ihse@20363 323 AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include])
erikj@13133 324 fi
ihse@20363 325 # List the contents of the lib.
ihse@20363 326 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
ihse@20363 327 if test "x$FREETYPELIB" = x; then
ihse@20363 328 AC_MSG_ERROR([Could not find libfreetype.so nor freetype.dll in $with_freetype/lib])
ohair@14111 329 fi
ihse@20363 330 # Check one h-file
ihse@20363 331 if ! test -s "$with_freetype/include/ft2build.h"; then
ihse@20363 332 AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h])
ihse@20363 333 fi
ihse@20363 334 fi
ihse@20363 335 fi
ihse@20363 336 if test "x$FREETYPE2_FOUND" = xno; then
ihse@20363 337 BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
ihse@20363 338 USING_SYSTEM_FT_LIB=true
ihse@20363 339 fi
ihse@20363 340 if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
ihse@20363 341 FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
ihse@20363 342 BASIC_FIXUP_PATH(FREETYPELOCATION)
ihse@20363 343 AC_MSG_CHECKING([for freetype in some standard windows locations])
ihse@20363 344 if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
ihse@20363 345 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
ihse@20363 346 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
ihse@20363 347 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
ihse@20363 348 if ! test -s "$FREETYPE2_LIBS"; then
ihse@20363 349 AC_MSG_ERROR([Could not find $FREETYPE2_LIBS])
ihse@20363 350 fi
ihse@20363 351 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
ihse@20363 352 AC_MSG_ERROR([Could not find $FREETYPE2_LIB_PATH/freetype.dll])
ihse@20363 353 fi
ihse@20363 354 USING_SYSTEM_FT_LIB=true
ihse@20363 355 FREETYPE2_FOUND=yes
ihse@20363 356 fi
ihse@20363 357 AC_MSG_RESULT([$FREETYPE2_FOUND])
ihse@20363 358 fi
ihse@20363 359 if test "x$FREETYPE2_FOUND" = xno; then
ihse@20363 360 PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no])
ihse@20363 361 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
ihse@20363 362 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
ihse@20363 363 USING_SYSTEM_FT_LIB=true
ihse@20363 364 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
ihse@20363 365 if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
ihse@20363 366 FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
ihse@20363 367 fi
ihse@20363 368 fi
ihse@20363 369 if test "x$FREETYPE2_FOUND" = xno; then
ihse@20363 370 AC_MSG_CHECKING([for freetype in some standard locations])
ohair@14111 371
ihse@20363 372 if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
ihse@20363 373 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
ihse@20363 374 DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
ihse@20363 375 fi
ihse@20363 376 if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
ihse@20363 377 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
ihse@20363 378 DEFAULT_FREETYPE_LIBS="-lfreetype"
ihse@20363 379 fi
erikj@13133 380
ihse@20363 381 PREV_CXXCFLAGS="$CXXFLAGS"
ihse@20363 382 PREV_LDFLAGS="$LDFLAGS"
ihse@20363 383 CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
ihse@20363 384 LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
ihse@20363 385 AC_LINK_IFELSE([AC_LANG_SOURCE([[
ihse@20363 386 #include<ft2build.h>
ihse@20363 387 #include FT_FREETYPE_H
ihse@20363 388 int main() { return 0; }
ihse@20363 389 ]])],
ihse@20363 390 [
ihse@20363 391 # Yes, the default cflags and libs did the trick.
ihse@20363 392 FREETYPE2_FOUND=yes
ihse@20363 393 FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
ihse@20363 394 FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
ihse@20363 395 ],
ihse@20363 396 [
ihse@20363 397 FREETYPE2_FOUND=no
ihse@20363 398 ]
ihse@20363 399 )
ihse@20363 400 CXXCFLAGS="$PREV_CXXFLAGS"
ihse@20363 401 LDFLAGS="$PREV_LDFLAGS"
ihse@20363 402 AC_MSG_RESULT([$FREETYPE2_FOUND])
ihse@20363 403 USING_SYSTEM_FT_LIB=true
ihse@20363 404 fi
ihse@20363 405 if test "x$FREETYPE2_FOUND" = xno; then
ihse@20363 406 HELP_MSG_MISSING_DEPENDENCY([freetype2])
ihse@20363 407 AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ])
ihse@20363 408 fi
erikj@13133 409
ihse@20363 410 if test "x$OPENJDK_TARGET_OS" != xwindows; then
ihse@20363 411 # AC_CHECK_LIB does not support use of cl.exe
ihse@20363 412 PREV_LDFLAGS="$LDFLAGS"
ihse@20363 413 LDFLAGS="$FREETYPE2_LIBS"
ihse@20363 414 AC_CHECK_LIB(freetype, FT_Init_FreeType,
ihse@20363 415 FREETYPE2_FOUND=true,
ihse@20363 416 AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]))
ihse@20363 417 LDFLAGS="$PREV_LDFLAGS"
ihse@20363 418 fi
ihse@20363 419 fi
ihse@20363 420
ihse@20363 421 AC_SUBST(USING_SYSTEM_FT_LIB)
ihse@20363 422 AC_SUBST(FREETYPE2_LIB_PATH)
ihse@20363 423 AC_SUBST(FREETYPE2_CFLAGS)
ihse@20363 424 AC_SUBST(FREETYPE2_LIBS)
erikj@13133 425 ])
erikj@13133 426
erikj@13133 427 AC_DEFUN_ONCE([LIB_SETUP_ALSA],
erikj@13133 428 [
erikj@13133 429
ihse@20363 430 ###############################################################################
ihse@20363 431 #
ihse@20363 432 # Check for alsa headers and libraries. Used on Linux/GNU systems.
ihse@20363 433 #
ihse@20363 434 AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa],
ihse@20363 435 [specify prefix directory for the alsa package
ihse@20363 436 (expecting the libraries under PATH/lib and the headers under PATH/include)])])
ihse@20363 437 AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include],
ihse@20363 438 [specify directory for the alsa include files])])
ihse@20363 439 AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib],
ihse@20363 440 [specify directory for the alsa library])])
erikj@13133 441
ihse@20363 442 if test "x$ALSA_NOT_NEEDED" = xyes; then
ihse@20363 443 if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
ihse@20363 444 AC_MSG_WARN([alsa not used, so --with-alsa is ignored])
ihse@20363 445 fi
ihse@20363 446 ALSA_CFLAGS=
ihse@20363 447 ALSA_LIBS=
ihse@20363 448 else
ihse@20363 449 ALSA_FOUND=no
erikj@13133 450
ihse@20363 451 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
ihse@20363 452 AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
ihse@20363 453 fi
erikj@13133 454
ihse@20363 455 if test "x${with_alsa}" != x; then
ihse@20363 456 ALSA_LIBS="-L${with_alsa}/lib -lalsa"
ihse@20363 457 ALSA_CFLAGS="-I${with_alsa}/include"
ihse@20363 458 ALSA_FOUND=yes
ihse@20363 459 fi
ihse@20363 460 if test "x${with_alsa_include}" != x; then
ihse@20363 461 ALSA_CFLAGS="-I${with_alsa_include}"
ihse@20363 462 ALSA_FOUND=yes
ihse@20363 463 fi
ihse@20363 464 if test "x${with_alsa_lib}" != x; then
ihse@20363 465 ALSA_LIBS="-L${with_alsa_lib} -lalsa"
ihse@20363 466 ALSA_FOUND=yes
ihse@20363 467 fi
ihse@20363 468 if test "x$ALSA_FOUND" = xno; then
ihse@20363 469 BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
ihse@20363 470 fi
ihse@20363 471 if test "x$ALSA_FOUND" = xno; then
ihse@20363 472 PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
ihse@20363 473 fi
ihse@20363 474 if test "x$ALSA_FOUND" = xno; then
ihse@20363 475 AC_CHECK_HEADERS([alsa/asoundlib.h],
ihse@20363 476 [
ihse@20363 477 ALSA_FOUND=yes
ihse@20363 478 ALSA_CFLAGS=-Iignoreme
ihse@20363 479 ALSA_LIBS=-lasound
ihse@20363 480 DEFAULT_ALSA=yes
ihse@20363 481 ],
ihse@20363 482 [ALSA_FOUND=no])
ihse@20363 483 fi
ihse@20363 484 if test "x$ALSA_FOUND" = xno; then
ihse@20363 485 HELP_MSG_MISSING_DEPENDENCY([alsa])
ihse@20363 486 AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
ihse@20363 487 fi
ihse@20363 488 fi
erikj@13133 489
ihse@20363 490 AC_SUBST(ALSA_CFLAGS)
ihse@20363 491 AC_SUBST(ALSA_LIBS)
erikj@13133 492 ])
erikj@13133 493
erikj@13133 494 AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
erikj@13133 495 [
erikj@13133 496
ihse@20363 497 ###############################################################################
ihse@20363 498 #
ihse@20363 499 # Check for the jpeg library
ihse@20363 500 #
erikj@13133 501
ihse@20363 502 USE_EXTERNAL_LIBJPEG=true
ihse@20363 503 AC_CHECK_LIB(jpeg, main, [],
ihse@20363 504 [ USE_EXTERNAL_LIBJPEG=false
ihse@20363 505 AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
ihse@20363 506 ])
ihse@20363 507 AC_SUBST(USE_EXTERNAL_LIBJPEG)
erikj@13133 508
ihse@20363 509 ###############################################################################
ihse@20363 510 #
ihse@20363 511 # Check for the gif library
ihse@20363 512 #
omajid@16424 513
ihse@20363 514 AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib],
ihse@20363 515 [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
omajid@16424 516
omajid@16424 517
ihse@20363 518 AC_MSG_CHECKING([for which giflib to use])
omajid@16424 519
ihse@20363 520 # default is bundled
ihse@20363 521 DEFAULT_GIFLIB=bundled
ihse@20363 522
ihse@20363 523 #
ihse@20363 524 # if user didn't specify, use DEFAULT_GIFLIB
ihse@20363 525 #
ihse@20363 526 if test "x${with_giflib}" = "x"; then
omajid@16424 527 with_giflib=${DEFAULT_GIFLIB}
ihse@20363 528 fi
omajid@16424 529
ihse@20363 530 AC_MSG_RESULT(${with_giflib})
omajid@16424 531
ihse@20363 532 if test "x${with_giflib}" = "xbundled"; then
omajid@16424 533 USE_EXTERNAL_LIBGIF=false
ihse@20363 534 elif test "x${with_giflib}" = "xsystem"; then
omajid@16424 535 AC_CHECK_HEADER(gif_lib.h, [],
ihse@20363 536 [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])])
omajid@16424 537 AC_CHECK_LIB(gif, DGifGetCode, [],
ihse@20363 538 [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])])
omajid@16424 539
omajid@16424 540 USE_EXTERNAL_LIBGIF=true
ihse@20363 541 else
omajid@16424 542 AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'])
ihse@20363 543 fi
ihse@20363 544 AC_SUBST(USE_EXTERNAL_LIBGIF)
erikj@13133 545
ihse@20363 546 ###############################################################################
ihse@20363 547 #
ihse@20363 548 # Check for the zlib library
ihse@20363 549 #
erikj@13133 550
ihse@20363 551 AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib],
ihse@20363 552 [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
erikj@13133 553
ihse@20363 554 AC_CHECK_LIB(z, compress,
ihse@20363 555 [ ZLIB_FOUND=yes ],
ihse@20363 556 [ ZLIB_FOUND=no ])
erikj@13133 557
ihse@20363 558 AC_MSG_CHECKING([for which zlib to use])
erikj@13133 559
ihse@20363 560 DEFAULT_ZLIB=bundled
ihse@20363 561 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
ihse@20363 562 #
ihse@20363 563 # On macosx default is system...on others default is
ihse@20363 564 #
erikj@13133 565 DEFAULT_ZLIB=system
ihse@20363 566 fi
erikj@13133 567
ihse@20363 568 if test "x${ZLIB_FOUND}" != "xyes"; then
ihse@20363 569 #
ihse@20363 570 # If we don't find any system...set default to bundled
ihse@20363 571 #
erikj@13133 572 DEFAULT_ZLIB=bundled
ihse@20363 573 fi
erikj@13133 574
ihse@20363 575 #
ihse@20363 576 # If user didn't specify, use DEFAULT_ZLIB
ihse@20363 577 #
ihse@20363 578 if test "x${with_zlib}" = "x"; then
erikj@13133 579 with_zlib=${DEFAULT_ZLIB}
ihse@20363 580 fi
erikj@13133 581
ihse@20363 582 if test "x${with_zlib}" = "xbundled"; then
erikj@13133 583 USE_EXTERNAL_LIBZ=false
erikj@13133 584 AC_MSG_RESULT([bundled])
ihse@20363 585 elif test "x${with_zlib}" = "xsystem"; then
erikj@13133 586 if test "x${ZLIB_FOUND}" = "xyes"; then
ihse@20363 587 USE_EXTERNAL_LIBZ=true
ihse@20363 588 AC_MSG_RESULT([system])
erikj@13133 589 else
ihse@20363 590 AC_MSG_RESULT([system not found])
ihse@20363 591 AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!])
erikj@13133 592 fi
ihse@20363 593 else
ihse@20363 594 AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'])
ihse@20363 595 fi
erikj@13133 596
ihse@20363 597 AC_SUBST(USE_EXTERNAL_LIBZ)
erikj@13133 598
ihse@20363 599 ###############################################################################
ihse@20363 600 LIBZIP_CAN_USE_MMAP=true
ohair@13697 601
ihse@20363 602 AC_SUBST(LIBZIP_CAN_USE_MMAP)
erikj@13133 603
ihse@20363 604 ###############################################################################
ihse@20363 605 #
ihse@20363 606 # Check if altzone exists in time.h
ihse@20363 607 #
erikj@13133 608
ihse@20363 609 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])],
ihse@20363 610 [has_altzone=yes],
ihse@20363 611 [has_altzone=no])
ihse@20363 612 if test "x$has_altzone" = xyes; then
erikj@13133 613 AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h])
ihse@20363 614 fi
erikj@13133 615
ihse@20363 616 ###############################################################################
ihse@20363 617 #
ihse@20363 618 # Check the maths library
ihse@20363 619 #
erikj@13133 620
ihse@20363 621 AC_CHECK_LIB(m, cos, [],
ihse@20363 622 [
ihse@20363 623 AC_MSG_NOTICE([Maths library was not found])
ihse@20363 624 ]
ihse@20363 625 )
ihse@20363 626 AC_SUBST(LIBM)
erikj@13133 627
ihse@20363 628 ###############################################################################
ihse@20363 629 #
ihse@20363 630 # Check for libdl.so
erikj@13133 631
ihse@20363 632 save_LIBS="$LIBS"
ihse@20363 633 LIBS=""
ihse@20363 634 AC_CHECK_LIB(dl,dlopen)
ihse@20363 635 LIBDL="$LIBS"
ihse@20363 636 AC_SUBST(LIBDL)
ihse@20363 637 LIBS="$save_LIBS"
erikj@13133 638 ])
erikj@13133 639
erikj@13133 640 AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
erikj@13133 641 [
ihse@20363 642 ###############################################################################
ihse@20363 643 #
ihse@20363 644 # statically link libstdc++ before C++ ABI is stablized on Linux unless
ihse@20363 645 # dynamic build is configured on command line.
ihse@20363 646 #
ihse@20363 647 AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
ihse@20363 648 [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
ihse@20363 649 [
ihse@20363 650 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
ihse@20363 651 && test "x$with_stdc__lib" != xdefault; then
ihse@20363 652 AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!])
ihse@20363 653 fi
ihse@20363 654 ],
ihse@20363 655 [with_stdc__lib=default]
ihse@20363 656 )
erikj@13133 657
ihse@20363 658 if test "x$OPENJDK_TARGET_OS" = xlinux; then
erikj@13133 659 # Test if -lstdc++ works.
erikj@13133 660 AC_MSG_CHECKING([if dynamic link of stdc++ is possible])
erikj@13133 661 AC_LANG_PUSH(C++)
erikj@13133 662 OLD_CXXFLAGS="$CXXFLAGS"
erikj@13133 663 CXXFLAGS="$CXXFLAGS -lstdc++"
erikj@13133 664 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
ihse@20363 665 [has_dynamic_libstdcxx=yes],
ihse@20363 666 [has_dynamic_libstdcxx=no])
erikj@13133 667 CXXFLAGS="$OLD_CXXFLAGS"
erikj@13133 668 AC_LANG_POP(C++)
erikj@13133 669 AC_MSG_RESULT([$has_dynamic_libstdcxx])
erikj@13133 670
erikj@13133 671 # Test if stdc++ can be linked statically.
erikj@13133 672 AC_MSG_CHECKING([if static link of stdc++ is possible])
erikj@13133 673 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
erikj@13133 674 AC_LANG_PUSH(C++)
erikj@13133 675 OLD_LIBS="$LIBS"
erikj@13133 676 OLD_CXX="$CXX"
erikj@13133 677 LIBS="$STATIC_STDCXX_FLAGS"
ihse@20363 678 CXX="$CC"
erikj@13133 679 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
ihse@20363 680 [has_static_libstdcxx=yes],
ihse@20363 681 [has_static_libstdcxx=no])
erikj@13133 682 LIBS="$OLD_LIBS"
erikj@13133 683 CXX="$OLD_CXX"
erikj@13133 684 AC_LANG_POP(C++)
erikj@13133 685 AC_MSG_RESULT([$has_static_libstdcxx])
erikj@13133 686
tbell@14459 687 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
ihse@20363 688 AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!])
erikj@13133 689 fi
erikj@13133 690
tbell@14459 691 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
ihse@20363 692 AC_MSG_ERROR([Static linking of libstdc++ was not possible!])
erikj@13133 693 fi
erikj@13133 694
tbell@14459 695 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
ihse@20363 696 AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!])
erikj@13133 697 fi
erikj@13133 698
erikj@13133 699 AC_MSG_CHECKING([how to link with libstdc++])
tbell@14459 700 # If dynamic was requested, it's available since it would fail above otherwise.
tbell@14459 701 # If dynamic wasn't requested, go with static unless it isn't available.
omajid@16581 702 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
ihse@20363 703 LIBCXX="$LIBCXX -lstdc++"
ihse@20363 704 LDCXX="$CXX"
ihse@20363 705 STATIC_CXX_SETTING="STATIC_CXX=false"
ihse@20363 706 AC_MSG_RESULT([dynamic])
tbell@14459 707 else
ihse@20363 708 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
ihse@20363 709 LDCXX="$CC"
ihse@20363 710 STATIC_CXX_SETTING="STATIC_CXX=true"
ihse@20363 711 AC_MSG_RESULT([static])
erikj@13133 712 fi
ihse@20363 713 fi
ihse@20363 714 AC_SUBST(STATIC_CXX_SETTING)
erikj@13133 715
ihse@20363 716 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
omajid@16581 717 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
omajid@16581 718 PKG_CHECK_MODULES([LIBFFI], [libffi])
omajid@16581 719
ihse@20363 720 fi
omajid@16581 721
ihse@20363 722 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
omajid@16581 723 AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
omajid@16581 724
omajid@16581 725 if test "x$LLVM_CONFIG" != xllvm-config; then
ihse@20363 726 AC_MSG_ERROR([llvm-config not found in $PATH.])
omajid@16581 727 fi
omajid@16581 728
omajid@16581 729 llvm_components="jit mcjit engine nativecodegen native"
omajid@16581 730 unset LLVM_CFLAGS
omajid@16581 731 for flag in $("$LLVM_CONFIG" --cxxflags); do
omajid@16581 732 if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then
omajid@16581 733 if test "${flag}" != "-D_DEBUG" ; then
omajid@16581 734 if test "${LLVM_CFLAGS}" != "" ; then
omajid@16581 735 LLVM_CFLAGS="${LLVM_CFLAGS} "
omajid@16581 736 fi
omajid@16581 737 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
omajid@16581 738 fi
omajid@16581 739 fi
omajid@16581 740 done
omajid@16581 741 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
omajid@16581 742 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
omajid@16581 743
omajid@16581 744 unset LLVM_LDFLAGS
omajid@16581 745 for flag in $("${LLVM_CONFIG}" --ldflags); do
omajid@16581 746 if echo "${flag}" | grep -q '^-L'; then
omajid@16581 747 if test "${LLVM_LDFLAGS}" != ""; then
omajid@16581 748 LLVM_LDFLAGS="${LLVM_LDFLAGS} "
omajid@16581 749 fi
omajid@16581 750 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
omajid@16581 751 fi
omajid@16581 752 done
omajid@16581 753
omajid@16581 754 unset LLVM_LIBS
omajid@16581 755 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
omajid@16581 756 if echo "${flag}" | grep -q '^-l'; then
omajid@16581 757 if test "${LLVM_LIBS}" != ""; then
omajid@16581 758 LLVM_LIBS="${LLVM_LIBS} "
omajid@16581 759 fi
omajid@16581 760 LLVM_LIBS="${LLVM_LIBS}${flag}"
omajid@16581 761 fi
omajid@16581 762 done
omajid@16581 763
omajid@16581 764 AC_SUBST(LLVM_CFLAGS)
omajid@16581 765 AC_SUBST(LLVM_LDFLAGS)
omajid@16581 766 AC_SUBST(LLVM_LIBS)
ihse@20363 767 fi
omajid@16581 768
ihse@20363 769 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
ihse@20363 770 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
ohair@13697 771 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
ihse@20363 772 fi
erikj@13133 773
ihse@20363 774 # TODO better (platform agnostic) test
ihse@20363 775 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
erikj@13133 776 LIBCXX="-lstdc++"
ihse@20363 777 fi
erikj@13133 778
ihse@20363 779 AC_SUBST(LIBCXX)
erikj@13133 780 ])