common/autoconf/help.m4

Tue, 10 Apr 2012 08:18:28 -0700

author
ohair
date
Tue, 10 Apr 2012 08:18:28 -0700
changeset 425
e1830598f0b7
child 445
efd26e051e50
permissions
-rw-r--r--

7074397: Build infrastructure changes (makefile re-write)
Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: ohrstrom <fredrik.ohrstrom@oracle.com>, erikj <erik.joelsson@oracle.com>, ihse <magnus.ihse.bursie@oracle.com>, tgranat <torbjorn.granat@oracle.com>, ykantser <yekaterina.kantserova@oracle.com>

     1 #
     2 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     8 # particular file as subject to the "Classpath" exception as provided
     9 # by Oracle in the LICENSE file that accompanied this code.
    10 #
    11 # This code is distributed in the hope that it will be useful, but WITHOUT
    12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    14 # version 2 for more details (a copy is included in the LICENSE file that
    15 # accompanied this code).
    16 #
    17 # You should have received a copy of the GNU General Public License version
    18 # 2 along with this work; if not, write to the Free Software Foundation,
    19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    20 #
    21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22 # or visit www.oracle.com if you need additional information or have any
    23 # questions.
    24 #
    26 function help_on_build_dependency {
    27     # Print a helpful message on how to acquire the necessary build dependency.
    28     # $1 is the help tag: freetyp2, cups, pulse, alsa etc
    29     MISSING_DEPENDENCY=$1
    30     PKGHANDLER_COMMAND=
    32     AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
    34     case $PKGHANDLER in
    35 	apt-get)
    36                 apt_help     $MISSING_DEPENDENCY ;;
    37         yum)
    38                 yum_help     $MISSING_DEPENDENCY ;;
    39 	port)
    40                 port_help    $MISSING_DEPENDENCY ;;
    41 	pkgutil)
    42                 pkgutil_help $MISSING_DEPENDENCY ;;
    43 	pkgadd)
    44                 pkgadd_help  $MISSING_DEPENDENCY ;;
    45     * )
    46       break ;;
    47     esac
    49     if test "x$PKGHANDLER_COMMAND" != x; then
    50         HELP_MSG="Try running '$PKGHANDLER_COMMAND'."
    51     fi
    52 }
    54 function apt_help {
    55     case $1 in
    56     devkit)
    57         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
    58     openjdk)
    59         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
    60     alsa)
    61         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
    62     cups)
    63         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
    64     freetype2)
    65         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
    66     pulse)
    67         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
    68     x11)
    69         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
    70     ccache)
    71         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
    72     * )
    73        break ;;
    74     esac
    75 }
    77 function yum_help {
    78     case $1 in
    79     devkit)
    80         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
    81     openjdk)
    82         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
    83     alsa)
    84         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
    85     cups)
    86         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
    87     freetype2)
    88         PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
    89     pulse)
    90         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
    91     x11)
    92         PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
    93     ccache)
    94         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
    95     * )
    96        break ;;
    97     esac
    98 }
   100 function port_help {
   101     PKGHANDLER_COMMAND=""
   102 }
   104 function pkgutil_help {
   105     PKGHANDLER_COMMAND=""
   106 }
   108 function pkgadd_help {
   109     PKGHANDLER_COMMAND=""
   110 }

mercurial