~vcs-imports/ubuntu-tweak/trunk

« back to all changes in this revision

Viewing changes to configure

  • Committer: tualatrix
  • Date: 2008-12-08 02:55:00 UTC
  • Revision ID: vcs-imports@canonical.com-20081208025500-xmpy956tbr6zc2p4
Remove config.h from autoc, added more scripts and make the ScriptWorker more powerful

Show diffs side-by-side

added added

removed removed

Lines of Context:
2337
2337
 
2338
2338
 
2339
2339
 
2340
 
ac_config_headers="$ac_config_headers config.h"
2341
 
 
2342
 
 
 
2340
#AC_CONFIG_HEADER(config.h)
 
2341
#AC_CONFIG_MACRO_DIR([m4])
2343
2342
 
2344
2343
 
2345
2344
 
6084
6083
# Let make expand exec_prefix.
6085
6084
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6086
6085
 
6087
 
DEFS=-DHAVE_CONFIG_H
 
6086
# Transform confdefs.h into DEFS.
 
6087
# Protect against shell expansion while executing Makefile rules.
 
6088
# Protect against Makefile macro expansion.
 
6089
#
 
6090
# If the first sed substitution is executed (which looks for macros that
 
6091
# take arguments), then branch to the quote section.  Otherwise,
 
6092
# look for a macro that doesn't take arguments.
 
6093
ac_script='
 
6094
:mline
 
6095
/\\$/{
 
6096
 N
 
6097
 s,\\\n,,
 
6098
 b mline
 
6099
}
 
6100
t clear
 
6101
:clear
 
6102
s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
 
6103
t quote
 
6104
s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
 
6105
t quote
 
6106
b any
 
6107
:quote
 
6108
s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
 
6109
s/\[/\\&/g
 
6110
s/\]/\\&/g
 
6111
s/\$/$$/g
 
6112
H
 
6113
:any
 
6114
${
 
6115
        g
 
6116
        s/^\n//
 
6117
        s/\n/ /g
 
6118
        p
 
6119
}
 
6120
'
 
6121
DEFS=`sed -n "$ac_script" confdefs.h`
 
6122
 
6088
6123
 
6089
6124
ac_libobjs=
6090
6125
ac_ltlibobjs=
6456
6491
"*) set x $ac_config_files; shift; ac_config_files=$*;;
6457
6492
esac
6458
6493
 
6459
 
case $ac_config_headers in *"
6460
 
"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
6461
 
esac
6462
6494
 
6463
6495
 
6464
6496
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6465
6497
# Files that config.status was made for.
6466
6498
config_files="$ac_config_files"
6467
 
config_headers="$ac_config_headers"
6468
6499
config_commands="$ac_config_commands"
6469
6500
 
6470
6501
_ACEOF
6484
6515
      --recheck    update $as_me by reconfiguring in the same conditions
6485
6516
      --file=FILE[:TEMPLATE]
6486
6517
                   instantiate the configuration file FILE
6487
 
      --header=FILE[:TEMPLATE]
6488
 
                   instantiate the configuration header FILE
6489
6518
 
6490
6519
Configuration files:
6491
6520
$config_files
6492
6521
 
6493
 
Configuration headers:
6494
 
$config_headers
6495
 
 
6496
6522
Configuration commands:
6497
6523
$config_commands
6498
6524
 
6550
6576
    esac
6551
6577
    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
6552
6578
    ac_need_defaults=false;;
6553
 
  --header | --heade | --head | --hea )
6554
 
    $ac_shift
6555
 
    case $ac_optarg in
6556
 
    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
6557
 
    esac
6558
 
    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
6559
 
    ac_need_defaults=false;;
6560
 
  --he | --h)
6561
 
    # Conflict between --help and --header
6562
 
    { $as_echo "$as_me: error: ambiguous option: $1
6563
 
Try \`$0 --help' for more information." >&2
6564
 
   { (exit 1); exit 1; }; };;
6565
 
  --help | --hel | -h )
 
6579
  --he | --h |  --help | --hel | -h )
6566
6580
    $as_echo "$ac_cs_usage"; exit ;;
6567
6581
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
6568
6582
  | -silent | --silent | --silen | --sile | --sil | --si | --s)
6631
6645
for ac_config_target in $ac_config_targets
6632
6646
do
6633
6647
  case $ac_config_target in
6634
 
    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
6635
6648
    "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
6636
6649
    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
6637
6650
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
6668
6681
# bizarre bug on SunOS 4.1.3.
6669
6682
if $ac_need_defaults; then
6670
6683
  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
6671
 
  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
6672
6684
  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
6673
6685
fi
6674
6686
 
6853
6865
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6854
6866
fi # test -n "$CONFIG_FILES"
6855
6867
 
6856
 
# Set up the scripts for CONFIG_HEADERS section.
6857
 
# No need to generate them if there are no CONFIG_HEADERS.
6858
 
# This happens for instance with `./config.status Makefile'.
6859
 
if test -n "$CONFIG_HEADERS"; then
6860
 
cat >"$tmp/defines.awk" <<\_ACAWK ||
6861
 
BEGIN {
6862
 
_ACEOF
6863
 
 
6864
 
# Transform confdefs.h into an awk script `defines.awk', embedded as
6865
 
# here-document in config.status, that substitutes the proper values into
6866
 
# config.h.in to produce config.h.
6867
 
 
6868
 
# Create a delimiter string that does not exist in confdefs.h, to ease
6869
 
# handling of long lines.
6870
 
ac_delim='%!_!# '
6871
 
for ac_last_try in false false :; do
6872
 
  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
6873
 
  if test -z "$ac_t"; then
6874
 
    break
6875
 
  elif $ac_last_try; then
6876
 
    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
6877
 
$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
6878
 
   { (exit 1); exit 1; }; }
6879
 
  else
6880
 
    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
6881
 
  fi
6882
 
done
6883
 
 
6884
 
# For the awk script, D is an array of macro values keyed by name,
6885
 
# likewise P contains macro parameters if any.  Preserve backslash
6886
 
# newline sequences.
6887
 
 
6888
 
ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
6889
 
sed -n '
6890
 
s/.\{148\}/&'"$ac_delim"'/g
6891
 
t rset
6892
 
:rset
6893
 
s/^[     ]*#[    ]*define[       ][      ]*/ /
6894
 
t def
6895
 
d
6896
 
:def
6897
 
s/\\$//
6898
 
t bsnl
6899
 
s/["\\]/\\&/g
6900
 
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
6901
 
D["\1"]=" \3"/p
6902
 
s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
6903
 
d
6904
 
:bsnl
6905
 
s/["\\]/\\&/g
6906
 
s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
6907
 
D["\1"]=" \3\\\\\\n"\\/p
6908
 
t cont
6909
 
s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
6910
 
t cont
6911
 
d
6912
 
:cont
6913
 
n
6914
 
s/.\{148\}/&'"$ac_delim"'/g
6915
 
t clear
6916
 
:clear
6917
 
s/\\$//
6918
 
t bsnlc
6919
 
s/["\\]/\\&/g; s/^/"/; s/$/"/p
6920
 
d
6921
 
:bsnlc
6922
 
s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
6923
 
b cont
6924
 
' <confdefs.h | sed '
6925
 
s/'"$ac_delim"'/"\\\
6926
 
"/g' >>$CONFIG_STATUS || ac_write_fail=1
6927
 
 
6928
 
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
6929
 
  for (key in D) D_is_set[key] = 1
6930
 
  FS = ""
6931
 
}
6932
 
/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
6933
 
  line = \$ 0
6934
 
  split(line, arg, " ")
6935
 
  if (arg[1] == "#") {
6936
 
    defundef = arg[2]
6937
 
    mac1 = arg[3]
6938
 
  } else {
6939
 
    defundef = substr(arg[1], 2)
6940
 
    mac1 = arg[2]
6941
 
  }
6942
 
  split(mac1, mac2, "(") #)
6943
 
  macro = mac2[1]
6944
 
  prefix = substr(line, 1, index(line, defundef) - 1)
6945
 
  if (D_is_set[macro]) {
6946
 
    # Preserve the white space surrounding the "#".
6947
 
    print prefix "define", macro P[macro] D[macro]
6948
 
    next
6949
 
  } else {
6950
 
    # Replace #undef with comments.  This is necessary, for example,
6951
 
    # in the case of _POSIX_SOURCE, which is predefined and required
6952
 
    # on some systems where configure will not decide to define it.
6953
 
    if (defundef == "undef") {
6954
 
      print "/*", prefix defundef, macro, "*/"
6955
 
      next
6956
 
    }
6957
 
  }
6958
 
}
6959
 
{ print }
6960
 
_ACAWK
6961
 
_ACEOF
6962
 
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6963
 
  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
6964
 
$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
6965
 
   { (exit 1); exit 1; }; }
6966
 
fi # test -n "$CONFIG_HEADERS"
6967
 
 
6968
 
 
6969
 
eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
 
6868
 
 
6869
eval set X "  :F $CONFIG_FILES      :C $CONFIG_COMMANDS"
6970
6870
shift
6971
6871
for ac_tag
6972
6872
do
7236
7136
$as_echo "$as_me: error: could not create $ac_file" >&2;}
7237
7137
   { (exit 1); exit 1; }; }
7238
7138
 ;;
7239
 
  :H)
7240
 
  #
7241
 
  # CONFIG_HEADER
7242
 
  #
7243
 
  if test x"$ac_file" != x-; then
7244
 
    {
7245
 
      $as_echo "/* $configure_input  */" \
7246
 
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
7247
 
    } >"$tmp/config.h" \
7248
 
      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
7249
 
$as_echo "$as_me: error: could not create $ac_file" >&2;}
7250
 
   { (exit 1); exit 1; }; }
7251
 
    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
7252
 
      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
7253
 
$as_echo "$as_me: $ac_file is unchanged" >&6;}
7254
 
    else
7255
 
      rm -f "$ac_file"
7256
 
      mv "$tmp/config.h" "$ac_file" \
7257
 
        || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
7258
 
$as_echo "$as_me: error: could not create $ac_file" >&2;}
7259
 
   { (exit 1); exit 1; }; }
7260
 
    fi
7261
 
  else
7262
 
    $as_echo "/* $configure_input  */" \
7263
 
      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
7264
 
      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
7265
 
$as_echo "$as_me: error: could not create -" >&2;}
7266
 
   { (exit 1); exit 1; }; }
7267
 
  fi
7268
 
# Compute "$ac_file"'s index in $config_headers.
7269
 
_am_arg="$ac_file"
7270
 
_am_stamp_count=1
7271
 
for _am_header in $config_headers :; do
7272
 
  case $_am_header in
7273
 
    $_am_arg | $_am_arg:* )
7274
 
      break ;;
7275
 
    * )
7276
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7277
 
  esac
7278
 
done
7279
 
echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
7280
 
$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7281
 
         X"$_am_arg" : 'X\(//\)[^/]' \| \
7282
 
         X"$_am_arg" : 'X\(//\)$' \| \
7283
 
         X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
7284
 
$as_echo X"$_am_arg" |
7285
 
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7286
 
            s//\1/
7287
 
            q
7288
 
          }
7289
 
          /^X\(\/\/\)[^/].*/{
7290
 
            s//\1/
7291
 
            q
7292
 
          }
7293
 
          /^X\(\/\/\)$/{
7294
 
            s//\1/
7295
 
            q
7296
 
          }
7297
 
          /^X\(\/\).*/{
7298
 
            s//\1/
7299
 
            q
7300
 
          }
7301
 
          s/.*/./; q'`/stamp-h$_am_stamp_count
7302
 
 ;;
 
7139
 
7303
7140
 
7304
7141
  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
7305
7142
$as_echo "$as_me: executing $ac_file commands" >&6;}