< prev index next >

common/autoconf/libraries.m4

Print this page




  80 
  81   if test "x$SUPPORT_HEADFUL" = xno; then
  82     X11_NOT_NEEDED=yes
  83   fi
  84 
  85   # Deprecated and now ignored
  86   BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support)
  87 ])
  88 
  89 AC_DEFUN_ONCE([LIB_SETUP_X11],
  90 [
  91 
  92   ###############################################################################
  93   #
  94   # Check for X Windows
  95   #
  96 
  97   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
  98   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
  99   # --x-libraries for the sysroot, if that seems to be correct.
 100   if test "x$SYS_ROOT" != "x/"; then

 101     if test "x$x_includes" = xNONE; then
 102       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
 103         x_includes="$SYS_ROOT/usr/X11R6/include"
 104       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
 105         x_includes="$SYS_ROOT/usr/include"
 106       fi
 107     fi
 108     if test "x$x_libraries" = xNONE; then
 109       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
 110         x_libraries="$SYS_ROOT/usr/X11R6/lib"
 111       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 112         x_libraries="$SYS_ROOT/usr/lib64"
 113       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
 114         x_libraries="$SYS_ROOT/usr/lib"

 115       fi
 116     fi
 117   fi
 118 
 119   # Now let autoconf do it's magic
 120   AC_PATH_X
 121   AC_PATH_XTRA
 122 
 123   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
 124   # this doesn't make sense so we remove it.
 125   if test "x$COMPILE_TYPE" = xcross; then
 126     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
 127   fi
 128 
 129   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
 130     HELP_MSG_MISSING_DEPENDENCY([x11])
 131     AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
 132   fi
 133 

 134   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
 135     OPENWIN_HOME="/usr/openwin"





 136   fi
 137   AC_SUBST(OPENWIN_HOME)
 138 
 139 
 140   #
 141   # Weird Sol10 something check...TODO change to try compile
 142   #
 143   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
 144     if test "`uname -r`" = "5.10"; then
 145       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
 146         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
 147       fi
 148     fi
 149   fi
 150 
 151   AC_LANG_PUSH(C)
 152   OLD_CFLAGS="$CFLAGS"
 153   CFLAGS="$CFLAGS $X_CFLAGS"
 154 
 155   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
 156   AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
 157       [X11_A_OK=yes],
 158       [X11_A_OK=no; break],


 207       CUPS_CFLAGS="-I${with_cups_include}"
 208       CUPS_FOUND=yes
 209     fi
 210     if test "x$CUPS_FOUND" = xno; then
 211       BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
 212     fi
 213     if test "x$CUPS_FOUND" = xno; then
 214       # Are the cups headers installed in the default /usr/include location?
 215       AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
 216           [
 217             CUPS_FOUND=yes
 218             CUPS_CFLAGS=
 219             DEFAULT_CUPS=yes
 220           ]
 221       )
 222     fi
 223     if test "x$CUPS_FOUND" = xno; then
 224       # Getting nervous now? Lets poke around for standard Solaris third-party
 225       # package installation locations.
 226       AC_MSG_CHECKING([for cups headers])
 227       if test -s /opt/sfw/cups/include/cups/cups.h; then
 228         # An SFW package seems to be installed!
 229         CUPS_FOUND=yes
 230         CUPS_CFLAGS="-I/opt/sfw/cups/include"
 231       elif test -s /opt/csw/include/cups/cups.h; then
 232         # A CSW package seems to be installed!
 233         CUPS_FOUND=yes
 234         CUPS_CFLAGS="-I/opt/csw/include"
 235       fi
 236       AC_MSG_RESULT([$CUPS_FOUND])
 237     fi
 238     if test "x$CUPS_FOUND" = xno; then
 239       HELP_MSG_MISSING_DEPENDENCY([cups])
 240       AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
 241     fi
 242   fi
 243 
 244   AC_SUBST(CUPS_CFLAGS)
 245 
 246 ])
 247 
 248 AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
 249 [
 250   POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
 251   POTENTIAL_FREETYPE_LIB_PATH="$2"
 252   METHOD="$3"
 253   
 254   # First check if the files exists.


 368         else
 369           BUNDLE_FREETYPE=no
 370         fi
 371       fi
 372 
 373       if test "x$FOUND_FREETYPE" != xyes; then
 374         # Check builddeps
 375         BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
 376         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
 377         if test "x$FOUND_FREETYPE" = xyes; then
 378           if test "x$BUNDLE_FREETYPE" = xyes; then
 379             AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
 380             FOUND_FREETYPE=no
 381           else
 382             AC_MSG_CHECKING([for freetype])
 383             AC_MSG_RESULT([yes (using builddeps)])
 384           fi
 385         fi
 386       fi
 387 


 388       if test "x$FOUND_FREETYPE" != xyes; then
 389         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
 390         if test "x$PKG_CONFIG" != x; then
 391           PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
 392           if test "x$FOUND_FREETYPE" = xyes; then
 393             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
 394             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
 395             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
 396             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
 397               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
 398             fi
 399             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
 400             if test "x$BUNDLE_FREETYPE" = xyes; then
 401               AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
 402               FOUND_FREETYPE=no
 403             else
 404               AC_MSG_CHECKING([for freetype])
 405               AC_MSG_RESULT([yes (using pkg-config)])
 406             fi
 407           fi
 408         fi
 409       fi

 410 
 411       if test "x$FOUND_FREETYPE" != xyes; then
 412         # Check in well-known locations
 413         if test "x$OPENJDK_TARGET_OS" = xwindows; then
 414           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
 415           BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
 416           LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 417           if test "x$FOUND_FREETYPE" != xyes; then
 418             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
 419             BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
 420             LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 421           fi
 422         else
 423           if test "x$SYS_ROOT" = "x/"; then
 424             FREETYPE_ROOT=
 425           else
 426             FREETYPE_ROOT="$SYS_ROOT"
 427           fi
 428           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
 429           LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 430 
 431           if test "x$FOUND_FREETYPE" != xyes; then
 432             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
 433             LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 434           fi
 435 
 436           if test "x$FOUND_FREETYPE" != xyes; then
 437             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"





 438             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 439               LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
 440             else
 441               LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
 442               if test "x$FOUND_FREETYPE" != xyes; then
 443                 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
 444               fi
 445             fi
 446           fi
 447         fi
 448       fi # end check in well-known locations
 449 
 450       if test "x$FOUND_FREETYPE" != xyes; then
 451         HELP_MSG_MISSING_DEPENDENCY([freetype])
 452         AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
 453       fi
 454     fi # end user specified settings
 455 
 456     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
 457     if test "x$FREETYPE_CFLAGS" = x; then


 547     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
 548       AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
 549     fi
 550 
 551     if test "x${with_alsa}" != x; then
 552       ALSA_LIBS="-L${with_alsa}/lib -lasound"
 553       ALSA_CFLAGS="-I${with_alsa}/include"
 554       ALSA_FOUND=yes
 555     fi
 556     if test "x${with_alsa_include}" != x; then
 557       ALSA_CFLAGS="-I${with_alsa_include}"
 558       ALSA_FOUND=yes
 559     fi
 560     if test "x${with_alsa_lib}" != x; then
 561       ALSA_LIBS="-L${with_alsa_lib} -lasound"
 562       ALSA_FOUND=yes
 563     fi
 564     if test "x$ALSA_FOUND" = xno; then
 565       BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
 566     fi


 567     if test "x$ALSA_FOUND" = xno; then
 568       PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
 569     fi

 570     if test "x$ALSA_FOUND" = xno; then
 571       AC_CHECK_HEADERS([alsa/asoundlib.h],
 572           [
 573             ALSA_FOUND=yes
 574             ALSA_CFLAGS=-Iignoreme
 575             ALSA_LIBS=-lasound
 576             DEFAULT_ALSA=yes
 577           ],
 578           [ALSA_FOUND=no])
 579     fi
 580     if test "x$ALSA_FOUND" = xno; then
 581       HELP_MSG_MISSING_DEPENDENCY([alsa])
 582       AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
 583     fi
 584   fi
 585 
 586   AC_SUBST(ALSA_CFLAGS)
 587   AC_SUBST(ALSA_LIBS)
 588 ])
 589 


 847       fi
 848     done
 849 
 850     unset LLVM_LIBS
 851     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
 852       if echo "${flag}" | grep -q '^-l'; then
 853         if test "${LLVM_LIBS}" != ""; then
 854           LLVM_LIBS="${LLVM_LIBS} "
 855         fi
 856         LLVM_LIBS="${LLVM_LIBS}${flag}"
 857       fi
 858     done
 859 
 860     AC_SUBST(LLVM_CFLAGS)
 861     AC_SUBST(LLVM_LDFLAGS)
 862     AC_SUBST(LLVM_LIBS)
 863   fi
 864 
 865   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
 866   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
 867     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
 868   fi
 869 
 870   # TODO better (platform agnostic) test
 871   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
 872     LIBCXX="-lstdc++"
 873   fi
 874 
 875   AC_SUBST(LIBCXX)
 876 ])
 877 
 878 AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
 879 [
 880   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 881     TOOLCHAIN_SETUP_MSVCR_DLL
 882     BASIC_DEPRECATED_ARG_WITH([dxsdk])
 883     BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
 884     BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
 885   fi
 886   AC_SUBST(MSVCR_DLL)
 887 ])


  80 
  81   if test "x$SUPPORT_HEADFUL" = xno; then
  82     X11_NOT_NEEDED=yes
  83   fi
  84 
  85   # Deprecated and now ignored
  86   BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support)
  87 ])
  88 
  89 AC_DEFUN_ONCE([LIB_SETUP_X11],
  90 [
  91 
  92   ###############################################################################
  93   #
  94   # Check for X Windows
  95   #
  96 
  97   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
  98   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
  99   # --x-libraries for the sysroot, if that seems to be correct.
 100   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
 101     if test "x$SYSROOT" != "x"; then
 102       if test "x$x_includes" = xNONE; then
 103         if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
 104           x_includes="$SYSROOT/usr/X11R6/include"
 105         elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
 106           x_includes="$SYSROOT/usr/include"
 107         fi
 108       fi
 109       if test "x$x_libraries" = xNONE; then
 110         if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
 111           x_libraries="$SYSROOT/usr/X11R6/lib"
 112         elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 113           x_libraries="$SYSROOT/usr/lib64"
 114         elif test -f "$SYSROOT/usr/lib/libX11.so"; then
 115           x_libraries="$SYSROOT/usr/lib"
 116         fi
 117       fi
 118     fi
 119   fi
 120 
 121   # Now let autoconf do it's magic
 122   AC_PATH_X
 123   AC_PATH_XTRA
 124 
 125   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
 126   # this doesn't make sense so we remove it.
 127   if test "x$COMPILE_TYPE" = xcross; then
 128     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'`
 129   fi
 130 
 131   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
 132     HELP_MSG_MISSING_DEPENDENCY([x11])
 133     AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
 134   fi
 135 
 136 
 137   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
 138     OPENWIN_HOME="/usr/openwin"
 139     X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
 140     X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
 141         -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
 142         -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
 143         -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
 144   fi


 145 
 146   #
 147   # Weird Sol10 something check...TODO change to try compile
 148   #
 149   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
 150     if test "`uname -r`" = "5.10"; then
 151       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
 152         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
 153       fi
 154     fi
 155   fi
 156 
 157   AC_LANG_PUSH(C)
 158   OLD_CFLAGS="$CFLAGS"
 159   CFLAGS="$CFLAGS $X_CFLAGS"
 160 
 161   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
 162   AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h],
 163       [X11_A_OK=yes],
 164       [X11_A_OK=no; break],


 213       CUPS_CFLAGS="-I${with_cups_include}"
 214       CUPS_FOUND=yes
 215     fi
 216     if test "x$CUPS_FOUND" = xno; then
 217       BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes])
 218     fi
 219     if test "x$CUPS_FOUND" = xno; then
 220       # Are the cups headers installed in the default /usr/include location?
 221       AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],
 222           [
 223             CUPS_FOUND=yes
 224             CUPS_CFLAGS=
 225             DEFAULT_CUPS=yes
 226           ]
 227       )
 228     fi
 229     if test "x$CUPS_FOUND" = xno; then
 230       # Getting nervous now? Lets poke around for standard Solaris third-party
 231       # package installation locations.
 232       AC_MSG_CHECKING([for cups headers])
 233       if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
 234         # An SFW package seems to be installed!
 235         CUPS_FOUND=yes
 236         CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
 237       elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
 238         # A CSW package seems to be installed!
 239         CUPS_FOUND=yes
 240         CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
 241       fi
 242       AC_MSG_RESULT([$CUPS_FOUND])
 243     fi
 244     if test "x$CUPS_FOUND" = xno; then
 245       HELP_MSG_MISSING_DEPENDENCY([cups])
 246       AC_MSG_ERROR([Could not find cups! $HELP_MSG ])
 247     fi
 248   fi
 249 
 250   AC_SUBST(CUPS_CFLAGS)
 251 
 252 ])
 253 
 254 AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE],
 255 [
 256   POTENTIAL_FREETYPE_INCLUDE_PATH="$1"
 257   POTENTIAL_FREETYPE_LIB_PATH="$2"
 258   METHOD="$3"
 259   
 260   # First check if the files exists.


 374         else
 375           BUNDLE_FREETYPE=no
 376         fi
 377       fi
 378 
 379       if test "x$FOUND_FREETYPE" != xyes; then
 380         # Check builddeps
 381         BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
 382         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
 383         if test "x$FOUND_FREETYPE" = xyes; then
 384           if test "x$BUNDLE_FREETYPE" = xyes; then
 385             AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that])
 386             FOUND_FREETYPE=no
 387           else
 388             AC_MSG_CHECKING([for freetype])
 389             AC_MSG_RESULT([yes (using builddeps)])
 390           fi
 391         fi
 392       fi
 393 
 394       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
 395       if test "x$SYSROOT" = x; then
 396         if test "x$FOUND_FREETYPE" != xyes; then
 397           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
 398           if test "x$PKG_CONFIG" != x; then
 399             PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
 400             if test "x$FOUND_FREETYPE" = xyes; then
 401               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
 402               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
 403               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
 404               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
 405                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
 406               fi
 407               # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
 408               if test "x$BUNDLE_FREETYPE" = xyes; then
 409                 AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
 410                 FOUND_FREETYPE=no
 411               else
 412                 AC_MSG_CHECKING([for freetype])
 413                 AC_MSG_RESULT([yes (using pkg-config)])
 414               fi
 415             fi
 416           fi
 417         fi
 418       fi
 419 
 420       if test "x$FOUND_FREETYPE" != xyes; then
 421         # Check in well-known locations
 422         if test "x$OPENJDK_TARGET_OS" = xwindows; then
 423           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
 424           BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
 425           LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 426           if test "x$FOUND_FREETYPE" != xyes; then
 427             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
 428             BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR)
 429             LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 430           fi
 431         else
 432           FREETYPE_BASE_DIR="$SYSROOT/usr"





 433           LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 434 
 435           if test "x$FOUND_FREETYPE" != xyes; then
 436             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
 437             LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 438           fi
 439 
 440           if test "x$FOUND_FREETYPE" != xyes; then
 441             FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
 442             LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
 443           fi
 444 
 445           if test "x$FOUND_FREETYPE" != xyes; then
 446             FREETYPE_BASE_DIR="$SYSROOT/usr"
 447             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
 448               LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
 449             else
 450               LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location])
 451               if test "x$FOUND_FREETYPE" != xyes; then
 452                 LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location])
 453               fi
 454             fi
 455           fi
 456         fi
 457       fi # end check in well-known locations
 458 
 459       if test "x$FOUND_FREETYPE" != xyes; then
 460         HELP_MSG_MISSING_DEPENDENCY([freetype])
 461         AC_MSG_ERROR([Could not find freetype! $HELP_MSG ])
 462       fi
 463     fi # end user specified settings
 464 
 465     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
 466     if test "x$FREETYPE_CFLAGS" = x; then


 556     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
 557       AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.])
 558     fi
 559 
 560     if test "x${with_alsa}" != x; then
 561       ALSA_LIBS="-L${with_alsa}/lib -lasound"
 562       ALSA_CFLAGS="-I${with_alsa}/include"
 563       ALSA_FOUND=yes
 564     fi
 565     if test "x${with_alsa_include}" != x; then
 566       ALSA_CFLAGS="-I${with_alsa_include}"
 567       ALSA_FOUND=yes
 568     fi
 569     if test "x${with_alsa_lib}" != x; then
 570       ALSA_LIBS="-L${with_alsa_lib} -lasound"
 571       ALSA_FOUND=yes
 572     fi
 573     if test "x$ALSA_FOUND" = xno; then
 574       BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
 575     fi
 576     # Do not try pkg-config if we have a sysroot set.
 577     if test "x$SYSROOT" = x; then
 578       if test "x$ALSA_FOUND" = xno; then
 579         PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
 580       fi
 581     fi
 582     if test "x$ALSA_FOUND" = xno; then
 583       AC_CHECK_HEADERS([alsa/asoundlib.h],
 584           [
 585             ALSA_FOUND=yes
 586             ALSA_CFLAGS=-Iignoreme
 587             ALSA_LIBS=-lasound
 588             DEFAULT_ALSA=yes
 589           ],
 590           [ALSA_FOUND=no])
 591     fi
 592     if test "x$ALSA_FOUND" = xno; then
 593       HELP_MSG_MISSING_DEPENDENCY([alsa])
 594       AC_MSG_ERROR([Could not find alsa! $HELP_MSG ])
 595     fi
 596   fi
 597 
 598   AC_SUBST(ALSA_CFLAGS)
 599   AC_SUBST(ALSA_LIBS)
 600 ])
 601 


 859       fi
 860     done
 861 
 862     unset LLVM_LIBS
 863     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
 864       if echo "${flag}" | grep -q '^-l'; then
 865         if test "${LLVM_LIBS}" != ""; then
 866           LLVM_LIBS="${LLVM_LIBS} "
 867         fi
 868         LLVM_LIBS="${LLVM_LIBS}${flag}"
 869       fi
 870     done
 871 
 872     AC_SUBST(LLVM_CFLAGS)
 873     AC_SUBST(LLVM_LDFLAGS)
 874     AC_SUBST(LLVM_LIBS)
 875   fi
 876 
 877   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
 878   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
 879     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
 880   fi
 881 
 882   # TODO better (platform agnostic) test
 883   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
 884     LIBCXX="-lstdc++"
 885   fi
 886 
 887   AC_SUBST(LIBCXX)
 888 ])
 889 
 890 AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
 891 [
 892   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 893     TOOLCHAIN_SETUP_MSVCR_DLL
 894     BASIC_DEPRECATED_ARG_WITH([dxsdk])
 895     BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
 896     BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
 897   fi
 898   AC_SUBST(MSVCR_DLL)
 899 ])
< prev index next >