0
|
1 |
#!/bin/sh
|
|
2 |
# Run this to generate all the initial makefiles, etc.
|
|
3 |
|
|
4 |
#
|
|
5 |
# CDDL HEADER START
|
|
6 |
#
|
|
7 |
# The contents of this file are subject to the terms of the
|
|
8 |
# Common Development and Distribution License (the "License").
|
|
9 |
# You may not use this file except in compliance with the License.
|
|
10 |
#
|
|
11 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
12 |
# or http://www.opensolaris.org/os/licensing.
|
|
13 |
# See the License for the specific language governing permissions
|
|
14 |
# and limitations under the License.
|
|
15 |
#
|
|
16 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
17 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
18 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
19 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
20 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
21 |
#
|
|
22 |
# CDDL HEADER END
|
|
23 |
#
|
|
24 |
|
|
25 |
#
|
|
26 |
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
|
|
27 |
# Use is subject to license terms.
|
|
28 |
#
|
|
29 |
|
|
30 |
set -e
|
|
31 |
|
|
32 |
srcdir=`dirname $0`
|
|
33 |
test -z "$srcdir" && srcdir=.
|
|
34 |
|
|
35 |
ORIGDIR=`pwd`
|
|
36 |
cd $srcdir
|
|
37 |
PROJECT=cmdassist
|
|
38 |
TEST_TYPE=-f
|
|
39 |
FILE=src/panel.c
|
|
40 |
ACLOCAL=${ACLOCAL-aclocal}
|
|
41 |
INTLTOOLIZE=${INTLTOOLIZE-intltoolize}
|
|
42 |
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
|
|
43 |
AUTOMAKE=${AUTOMAKE-automake}
|
|
44 |
AUTOHEADER=${AUTOHEADER-autoheader}
|
|
45 |
AUTOCONF=${AUTOCONF-autoconf}
|
|
46 |
GNOMEDOCCOMMON=${GNOMEDOCCOMMON-gnome-doc-common}
|
|
47 |
LIBTOOLIZE_FLAGS="--copy --force --automake"
|
|
48 |
INTLTOOLIZE_FLAGS="--copy --force --automake"
|
|
49 |
|
|
50 |
DIE=0
|
|
51 |
|
|
52 |
have_intltool=false
|
|
53 |
if $INTLTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
|
|
54 |
intltool_version=`$INTLTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
|
|
55 |
if [ X${intltool_version} != "X" ]; then
|
|
56 |
have_intltool=true
|
|
57 |
fi
|
|
58 |
fi
|
|
59 |
|
|
60 |
if $have_intltool ; then : ; else
|
|
61 |
echo
|
|
62 |
echo "You must have intltool installed to compile $PROJECT."
|
|
63 |
DIE=1
|
|
64 |
fi
|
|
65 |
|
|
66 |
have_libtool=false
|
|
67 |
if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
|
|
68 |
libtool_version=`$LIBTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
|
|
69 |
case $libtool_version in
|
|
70 |
1.4*|1.5*|1.6*|1.7*|2*)
|
|
71 |
have_libtool=true
|
|
72 |
;;
|
|
73 |
esac
|
|
74 |
fi
|
|
75 |
if $have_libtool ; then : ; else
|
|
76 |
echo
|
|
77 |
echo "You must have libtool 1.4 installed to compile $PROJECT."
|
|
78 |
echo "Install the appropriate package for your distribution,"
|
|
79 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
|
80 |
DIE=1
|
|
81 |
fi
|
|
82 |
|
|
83 |
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
|
|
84 |
echo
|
|
85 |
echo "You must have autoconf installed to compile $PROJECT."
|
|
86 |
echo "libtool the appropriate package for your distribution,"
|
|
87 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
|
|
88 |
DIE=1
|
|
89 |
}
|
|
90 |
|
|
91 |
have_automake=false
|
|
92 |
need_libtoolize=true
|
|
93 |
if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
|
|
94 |
automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
|
95 |
case $automake_version in
|
|
96 |
1.2*|1.3*|1.4)
|
|
97 |
;;
|
|
98 |
1.4*)
|
|
99 |
have_automake=true
|
|
100 |
need_libtoolize=false
|
|
101 |
;;
|
|
102 |
*)
|
|
103 |
have_automake=true
|
|
104 |
;;
|
|
105 |
esac
|
|
106 |
fi
|
|
107 |
if $have_automake ; then : ; else
|
|
108 |
echo
|
|
109 |
echo "You must have automake 1.4-p1 installed to compile $PROJECT."
|
|
110 |
echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.4-p1.tar.gz"
|
|
111 |
echo "(or a newer version if it is available)"
|
|
112 |
DIE=1
|
|
113 |
fi
|
|
114 |
|
|
115 |
if test "$DIE" -eq 1; then
|
|
116 |
exit 1
|
|
117 |
fi
|
|
118 |
|
|
119 |
test $TEST_TYPE $FILE || {
|
|
120 |
echo "You must run this script in the top-level $PROJECT directory"
|
|
121 |
exit 1
|
|
122 |
}
|
|
123 |
|
|
124 |
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
|
125 |
if test -z "$*"; then
|
|
126 |
echo "I am going to run ./configure with no arguments - if you wish "
|
|
127 |
echo "to pass any to it, please specify them on the $0 command line."
|
|
128 |
fi
|
|
129 |
fi
|
|
130 |
|
|
131 |
echo Running $INTLTOOLIZE $INTLTOOLIZE_FLAGS
|
|
132 |
$INTLTOOLIZE $INTLTOOLIZE_FLAGS
|
|
133 |
|
|
134 |
case $need_libtoolize in
|
|
135 |
true)
|
|
136 |
echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
|
|
137 |
$LIBTOOLIZE $LIBTOOLIZE_FLAGS
|
|
138 |
;;
|
|
139 |
esac
|
|
140 |
|
|
141 |
echo Running $ACLOCAL $ACLOCAL_FLAGS
|
|
142 |
$ACLOCAL $ACLOCAL_FLAGS
|
|
143 |
|
|
144 |
# optionally run autoheader
|
|
145 |
if $AUTOHEADER --version < /dev/null > /dev/null 2>&1; then
|
|
146 |
echo Running $AUTOHEADER
|
|
147 |
$AUTOHEADER
|
|
148 |
fi
|
|
149 |
|
|
150 |
echo Running $GNOMEDOCCOMMON --copy
|
|
151 |
$GNOMEDOCCOMMON --copy
|
|
152 |
echo Running $AUTOMAKE -a -c -f $am_opt
|
|
153 |
$AUTOMAKE -a -c -f $am_opt
|
|
154 |
echo Running $AUTOCONF
|
|
155 |
$AUTOCONF
|
|
156 |
cd $ORIGDIR
|
|
157 |
|
|
158 |
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
|
159 |
echo Running $srcdir/configure
|
|
160 |
$srcdir/configure --enable-maintainer-mode "$@"
|
|
161 |
|
|
162 |
echo
|
|
163 |
echo "Now type 'make' to compile $PROJECT."
|
|
164 |
fi
|