Changeset 420 for trunk/configure
- Timestamp:
- Jun 20, 2006, 11:29:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure
r265 r420 18 18 CXXFLAGS="${CXXFLAGS}" 19 19 LDFLAGS="${LDFLAGS}" 20 VERBOSE=no 20 21 21 22 # … … 30 31 --disable-gtk Don't build the GTK+ GUI 31 32 --prefix=PATH Installation path 33 --verbose Display additional information for debugging 32 34 33 35 Some influential environment variables: … … 41 43 } 42 44 45 runcmd() 46 { 47 if [ "$VERBOSE" = yes ] 48 then 49 echo "$@" >&2 50 "$@" 51 else 52 "$@" > /dev/null 2>&1 53 fi 54 return $! 55 } 56 57 verbose() 58 { 59 if [ "$VERBOSE" = yes ] 60 then 61 echo "$@" 62 fi 63 } 64 43 65 cc_test() 44 66 { 67 verbose cc_test 45 68 cat > testconf.c <<EOF 46 69 int main() … … 49 72 } 50 73 EOF 51 if ! $CC -o testconf testconf.c > /dev/null 2>&1; then 74 if ! runcmd $CC -o testconf testconf.c 75 then 52 76 rm -f testconf.c testconf 53 77 echo "Could not find a working compiler" … … 59 83 openssl_test() 60 84 { 85 verbose openssl_test 61 86 cat > testconf.c << EOF 62 87 #include <stdio.h> … … 67 92 } 68 93 EOF 69 if $CC $CFLAGS $LDFLAGS -o testconf testconf.c -lcrypto > /dev/null 2>&194 if runcmd $CC $CFLAGS $LDFLAGS -o testconf testconf.c -lcrypto 70 95 then 71 96 echo "yes" … … 80 105 lm_test() 81 106 { 107 verbose lm_test 82 108 cat > testconf.c << EOF 83 109 int main() … … 86 112 } 87 113 EOF 88 if ! $CC -o testconf testconf.c > /dev/null 2>&189 then 90 if $CC -o testconf testconf.c -lm > /dev/null 2>&1114 if ! runcmd $CC -o testconf testconf.c 115 then 116 if runcmd $CC -o testconf testconf.c -lm 91 117 then 92 118 LDFLAGS="$LDFLAGS -lm" … … 98 124 lrintf_test() 99 125 { 126 verbose lrintf_test 100 127 cat > testconf.c << EOF 101 128 int main() … … 104 131 } 105 132 EOF 106 if ( $CC -o testconf testconf.c $LDFLAGS && ./testconf ) > /dev/null 2>&1133 if runcmd $CC -o testconf testconf.c $LDFLAGS && runcmd ./testconf 107 134 then 108 135 CFLAGS="$CFLAGS -DHAVE_LRINTF" … … 113 140 gettext_test() 114 141 { 142 verbose gettext_test 115 143 cat > testconf.c <<EOF 116 144 #include <libintl.h> … … 121 149 EOF 122 150 123 if $CC $CFLAGS_GTK $LDFLAGS_GTK -o testconf testconf.c > /dev/null 2>&1151 if runcmd $CC $CFLAGS_GTK $LDFLAGS_GTK -o testconf testconf.c 124 152 then 125 153 rm -f testconf.c testconf … … 130 158 /usr/local/include /usr/X11R6/include /usr/pkg/include 131 159 do 132 if $CC $CFLAGS_GTK -I$intl_testdir $LDFLAGS_GTK -o testconf testconf.c > /dev/null 2>&1160 if runcmd $CC $CFLAGS_GTK -I$intl_testdir $LDFLAGS_GTK -o testconf testconf.c 133 161 then 134 162 CFLAGS_GTK="CFLAGS_GTK -I$intl_testdir" … … 143 171 gtk_test() 144 172 { 145 if pkg-config gtk+-2.0 > /dev/null 2>&1 146 then 147 if expr `pkg-config --modversion gtk+-2.0` '>=' 2.6.0 > /dev/null 2>&1 173 verbose gtk_test 174 if runcmd pkg-config gtk+-2.0 175 then 176 if runcmd expr `pkg-config --modversion gtk+-2.0` '>=' 2.6.0 148 177 then 149 178 cat > testconf.c << EOF … … 154 183 } 155 184 EOF 156 if $CC `pkg-config gtk+-2.0 --cflags --libs` -o testconf testconf.c > /dev/null 2>&1185 if runcmd $CC `pkg-config gtk+-2.0 --cflags --libs` -o testconf testconf.c 157 186 then 158 187 CFLAGS_GTK=`pkg-config gtk+-2.0 --cflags` … … 199 228 PREFIX="$param" 200 229 ;; 230 x--verbose) 231 VERBOSE=yes 232 ;; 201 233 x--help) 202 234 usage
Note: See TracChangeset
for help on using the changeset viewer.