configure.ac
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Mon May 05 21:54:03 2014 +0200 (2014-05-05)
changeset 3298 1c6c2a687f63
parent 3297 021ddc052689
permissions -rw-r--r--
configure: look for more usual g-variants of some tools

Reported-by: Bryan Hundven <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
yann@2834
     1
#                                               -*- Autoconf -*-
yann@2834
     2
# Process this file with autoconf to produce a configure script.
yann@2834
     3
yann@2834
     4
AC_PREREQ([2.67])
yann@2834
     5
#AC_INIT([crosstool-NG], [hg], [crossgcc@sourceware.org])
yann@2834
     6
AC_INIT([crosstool-NG], [m4_esyscmd_s([cat .version])], [crossgcc@sourceware.org])
yann@2834
     7
AC_CONFIG_AUX_DIR([scripts])
yann@2834
     8
yann@2834
     9
#--------------------------------------------------------------------
yann@2834
    10
# A few helper macros
yann@2834
    11
yann@2834
    12
# Check for required tool
yann@2834
    13
AC_DEFUN(
yann@2834
    14
    [ACX_CHECK_TOOL_REQ],
yann@2834
    15
    [AC_CHECK_TOOLS([$1], [$2])
yann@2834
    16
     AS_IF(
yann@2834
    17
        [test -z "$$1"],
yann@2834
    18
        [AC_MSG_ERROR([missing required tool: $2])])
yann@2834
    19
    ])
yann@2834
    20
yann@2834
    21
# Check for required tool, set variable to full pathname
yann@2834
    22
AC_DEFUN(
yann@2834
    23
    [ACX_PATH_TOOL_REQ],
yann@2834
    24
    [ACX_CHECK_TOOL_REQ([$1], [$2])
yann@2834
    25
     AS_CASE(
yann@2834
    26
        [$$1],
yann@2834
    27
        [/*],,
yann@2834
    28
        [?*],[AC_MSG_CHECKING([for absolute path to $$1])
yann@2834
    29
              $1=$(which $$1)
yann@2834
    30
              AC_MSG_RESULT([$$1])])])
yann@2834
    31
yann@2834
    32
# Check for required program
yann@2834
    33
AC_DEFUN(
yann@2834
    34
    [ACX_CHECK_PROGS_REQ],
yann@2834
    35
    [AC_CHECK_PROGS([$1], [$2])
yann@2834
    36
     AS_IF(
yann@2834
    37
        [test -z "$$1"],
yann@2834
    38
        [AC_MSG_ERROR([missing required tool: $2])])
yann@2834
    39
    ])
yann@2834
    40
yann@2834
    41
# Check for path to required program
yann@2834
    42
AC_DEFUN(
yann@2834
    43
    [ACX_PATH_PROGS_REQ],
yann@2834
    44
    [AC_PATH_PROGS([$1], [$2])
yann@2834
    45
     AS_IF(
yann@2834
    46
        [test -z "$$1"],
yann@2834
    47
        [AC_MSG_ERROR([missing required tool: $2])])
yann@2834
    48
    ])
yann@2834
    49
yann@2834
    50
# Set the kconfig option
yann@2834
    51
AC_DEFUN(
yann@2834
    52
    [ACX_SET_KCONFIG_OPTION],
yann@2834
    53
    [AS_IF(
yann@2834
    54
        [test -n "$$1"],
yann@2840
    55
        [kconfig_options="$kconfig_options has_$1=y"],
yann@2840
    56
        [kconfig_options="$kconfig_options has_$1"])
yann@2834
    57
    ])
yann@2834
    58
yann@2834
    59
#--------------------------------------------------------------------
yann@2834
    60
# Allow dummy --{en,dis}able-{static,shared}
yann@2834
    61
AC_ARG_ENABLE(
yann@2834
    62
    [local],
yann@2834
    63
    [AS_HELP_STRING(
yann@2834
    64
        [--enable-local],
yann@3280
    65
        [do not install, and use current directory])])
yann@2834
    66
AC_SUBST([enable_local], [${enable_local:-no}])
yann@2834
    67
AC_ARG_ENABLE(
yann@2834
    68
    [shared],
yann@2834
    69
    [AS_HELP_STRING(
yann@2834
    70
        [--enable-shared],
yann@2834
    71
        [build shared libraries (default=yes) (ignored)])])
yann@2834
    72
AC_ARG_ENABLE(
yann@2834
    73
    [static],
yann@2834
    74
    [AS_HELP_STRING(
yann@2834
    75
        [--enable-static],
yann@2834
    76
        [build static libraries (default=yes) (ignored)])])
yann@2834
    77
yann@2834
    78
#---------------------------------------------------------------------
yann@2834
    79
# Check for --build and --host...
yann@2834
    80
AC_CANONICAL_BUILD
yann@2834
    81
AC_CANONICAL_HOST
yann@2834
    82
# ... but refuse --target
yann@2834
    83
AS_IF([test -n "$target_alias"],
yann@2834
    84
      AC_MSG_ERROR([--target is not allowed]))
yann@2834
    85
yann@2834
    86
# Allow program name tranformation (--program-{prefix,suffix,transform-name})
yann@2834
    87
AC_ARG_PROGRAM
yann@2834
    88
yann@2834
    89
#---------------------------------------------------------------------
yann@2834
    90
# Initial checks that are usually done first (I don't know why, that's
yann@2834
    91
# just what I seem to experience...)
yann@2834
    92
#---------------------------------------------------------------------
yann@3001
    93
AC_ARG_WITH([install],
yann@3001
    94
    AS_HELP_STRING([--with-install=PATH],
yann@3001
    95
                   [Specify the full PATH to a BSD-compatible install]),
yann@3001
    96
    [INSTALL=$withval])
yann@2834
    97
AC_PROG_INSTALL
yann@2839
    98
AC_PROG_GREP
yann@2834
    99
AC_PROG_EGREP
yann@2839
   100
AS_IF(
yann@2839
   101
    [test ! "$EGREP" = "$GREP -E"],
yann@2839
   102
    [AC_MSG_ERROR([egrep is not $GREP -E])])
yann@2834
   103
AC_CACHE_VAL([ac_cv_path_SED],
yann@2834
   104
    [AC_ARG_WITH([sed],
yann@2834
   105
        AS_HELP_STRING([--with-sed=PATH],
yann@2999
   106
                       [Specify the full PATH to GNU sed]),
yann@2834
   107
        [ac_cv_path_SED=$withval])])
yann@2834
   108
AC_PROG_SED
yann@2834
   109
AC_MSG_CHECKING([whether sed understands -r -i -e])
yann@2834
   110
touch .ct-ng.sed.test
yann@2834
   111
if ${SED} -r -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1; then
yann@2834
   112
    rm -f .ct-ng.sed.test
yann@2834
   113
    AC_MSG_RESULT([yes])
yann@2834
   114
else
yann@2834
   115
    rm -f .ct-ng.sed.test
yann@2834
   116
    AC_MSG_RESULT([no])
yann@2834
   117
    AC_MSG_ERROR()
yann@2834
   118
fi
yann@2834
   119
AC_PROG_LN_S
yann@2834
   120
yann@2834
   121
#--------------------------------------------------------------------
yann@2834
   122
# A bunch of boring tests...
yann@2834
   123
#--------------------------------------------------------------------
yann@2834
   124
AC_PROG_CC
yann@2834
   125
AS_IF([test -z "$CC"],
yann@2834
   126
      [AC_MSG_ERROR([no suitable compiler found])])
yann@2834
   127
AC_PROG_CPP
yann@3000
   128
yann@3000
   129
# But we still need a way to specify the PATH to GNU versions (Damn MacOS)
yann@3000
   130
AC_ARG_WITH([objcopy],
yann@3000
   131
    AS_HELP_STRING([--with-objcopy=PATH],
yann@3000
   132
                   [Specify the full PATH to GNU objcopy]),
yann@3000
   133
    [OBJCOPY=$withval])
yann@3000
   134
AC_ARG_WITH([objdump],
yann@3000
   135
    AS_HELP_STRING([--with-objdump=PATH],
yann@3000
   136
                   [Specify the full PATH to GNU objdump]),
yann@3000
   137
    [OBJDUMP=$withval])
yann@3000
   138
AC_ARG_WITH([ranlib],
yann@3000
   139
    AS_HELP_STRING([--with-ranlib=PATH],
yann@3000
   140
                   [Specify the full PATH to GNU ranlib]),
yann@3000
   141
    [RANLIB=$withval])
yann@3000
   142
AC_ARG_WITH([readelf],
yann@3000
   143
    AS_HELP_STRING([--with-readelf=PATH],
yann@3000
   144
                   [Specify the full PATH to GNU readelf]),
yann@3000
   145
    [READELF=$withval])
mingw@3231
   146
AC_ARG_WITH([gperf],
mingw@3231
   147
    AS_HELP_STRING([--with-gperf=PATH],
mingw@3231
   148
                   [Specify the full PATH to GNU gperf]),
mingw@3231
   149
    [GPERF=$withval])
yann@3000
   150
yann@2834
   151
AC_PROG_RANLIB
yann@3298
   152
ACX_PATH_TOOL_REQ([OBJCOPY], [gobjcopy objcopy])
yann@3298
   153
ACX_PATH_TOOL_REQ([OBJDUMP], [gobjdump objdump])
yann@3298
   154
ACX_PATH_TOOL_REQ([READELF], [greadelf readelf])
mingw@3231
   155
ACX_PATH_TOOL_REQ([GPERF], [gperf])
yann@2834
   156
yann@2834
   157
ACX_CHECK_PROGS_REQ([bison], [bison])
yann@2834
   158
ACX_CHECK_PROGS_REQ([flex], [flex])
yann@2834
   159
ACX_CHECK_PROGS_REQ([makeinfo], [makeinfo])
yann@2834
   160
ACX_CHECK_PROGS_REQ([cut], [cut])
yann@2834
   161
ACX_CHECK_PROGS_REQ([stat], [stat])
yann@2834
   162
ACX_CHECK_PROGS_REQ([readlink], [readlink])
yann@2961
   163
ACX_CHECK_PROGS_REQ([wget], [wget])
yann@2834
   164
ACX_CHECK_PROGS_REQ([tar], [tar])
yann@2834
   165
ACX_CHECK_PROGS_REQ([gzip], [gzip])
yann@2834
   166
ACX_CHECK_PROGS_REQ([bzip2], [bzip2])
yann@2834
   167
yann@2834
   168
#--------------------------------------------------------------------
yann@2834
   169
# Still boring, but remember the path, now...
yann@2834
   170
#--------------------------------------------------------------------
yann@2834
   171
ACX_PATH_PROGS_REQ([PATCH], [patch])
yann@2834
   172
yann@2834
   173
#--------------------------------------------------------------------
yann@2834
   174
# And a bunch of less boring tests...
yann@2834
   175
#--------------------------------------------------------------------
yann@2834
   176
# We need a bash that is >= 3.1
yann@2834
   177
AC_CACHE_VAL([ac_cv_path__BASH],
yann@2834
   178
    [AC_ARG_WITH([bash],
yann@2834
   179
        AS_HELP_STRING([--with-bash=PATH],
yann@2999
   180
                       [Specify the full PATH to GNU bash >= 3.1]),
yann@2834
   181
        [ac_cv_path__BASH=$withval])])
yann@2834
   182
AC_CACHE_CHECK([for bash >= 3.1], [ac_cv_path__BASH],
yann@2834
   183
    [AC_PATH_PROGS_FEATURE_CHECK([_BASH], [bash],
yann@2834
   184
        [[_BASH_ver=$($ac_path__BASH --version 2>&1 \
yann@2834
   185
                     |$EGREP '^GNU bash, version (3\.[1-9]|4)')
yann@2834
   186
          test -n "$_BASH_ver" && ac_cv_path__BASH=$ac_path__BASH ac_path__BASH_found=:]],
yann@2834
   187
        [AC_MSG_RESULT([no])
yann@2834
   188
         AC_MSG_ERROR([could not find bash >= 3.1])])])
yann@2834
   189
AC_SUBST([_BASH], [$ac_cv_path__BASH])
yann@2834
   190
yann@2999
   191
# We need a awk that *is* GNU awk
yann@2999
   192
AC_CACHE_VAL([ac_cv_path__AWK],
yann@2999
   193
    [AC_ARG_WITH([awk],
yann@2999
   194
        AS_HELP_STRING([--with-awk=PATH],
yann@2999
   195
                       [Specify the full PATH to GNU awk]),
yann@2999
   196
        [ac_cv_path__AWK=$withval])])
yann@2999
   197
AC_CACHE_CHECK([for GNU awk], [ac_cv_path__AWK],
yann@3297
   198
    [AC_PATH_PROGS_FEATURE_CHECK([_AWK], [gawk awk],
yann@2999
   199
        [[_AWK_ver=$($ac_path__AWK --version 2>&1 \
yann@2999
   200
                     |$EGREP '^GNU Awk ')
yann@2999
   201
          test -n "$_AWK_ver" && ac_cv_path__AWK=$ac_path__AWK ac_path__AWK_found=:]],
yann@2999
   202
        [AC_MSG_RESULT([no])
yann@2999
   203
         AC_MSG_ERROR([could not find GNU awk])])])
yann@2999
   204
AC_SUBST([_AWK], [$ac_cv_path__AWK])
yann@2999
   205
yann@2834
   206
#----------------------------------------
yann@2834
   207
# Check for GNU make 3.80 or above
yann@2834
   208
AC_CACHE_VAL([ac_cv_path_MAKE],
yann@2834
   209
    [AC_ARG_WITH([make],
yann@2834
   210
        AS_HELP_STRING([--with-make=PATH],
yann@2834
   211
                       [Specify the full PATH to GNU make >= 3.80]),
yann@2834
   212
        [ac_cv_path_MAKE=$withval])])
yann@2834
   213
AC_CACHE_CHECK([for GNU make >= 3.80], [ac_cv_path_MAKE],
yann@3297
   214
    [AC_PATH_PROGS_FEATURE_CHECK([MAKE], [gmake make],
yann@2834
   215
        [[MAKE_ver=$($ac_path_MAKE --version 2>&1 \
yann@2834
   216
                     |$EGREP '^GNU Make (3.[89][[:digit:]]|[4-9])')
yann@2834
   217
          test -n "$MAKE_ver" && ac_cv_path_MAKE=$ac_path_MAKE ac_path_MAKE_found=:]],
yann@2834
   218
        [AC_MSG_RESULT([no])
yann@2834
   219
         AC_MSG_ERROR([could not find GNU make >= 3.80])])])
yann@2834
   220
AC_SUBST([MAKE], [$ac_cv_path_MAKE])
yann@2834
   221
AC_PROG_MAKE_SET
yann@2834
   222
mingw@3292
   223
# Check for GNU make 3.81 exactly, otherwise
mingw@3292
   224
# it will be built as a companion tool.
mingw@3292
   225
AC_MSG_CHECKING([for make 3.81])
mingw@3292
   226
AS_IF(
mingw@3292
   227
      [test "$MAKE_ver" = "GNU Make 3.81"],
mingw@3292
   228
      [make381="y"
mingw@3292
   229
       AC_MSG_RESULT([yes])
mingw@3292
   230
      ],
mingw@3292
   231
      [make381=
mingw@3292
   232
       AC_MSG_RESULT([no])
mingw@3292
   233
      ]
mingw@3292
   234
     )
mingw@3292
   235
ACX_SET_KCONFIG_OPTION([make381])
mingw@3292
   236
yann@2834
   237
#----------------------------------------
yann@2834
   238
# Check for libtool >= 1.5.26
yann@2834
   239
AC_CACHE_VAL([ac_cv_path_LIBTOOL],
yann@2834
   240
    [AC_ARG_WITH([libtool],
yann@2834
   241
        AS_HELP_STRING([--with-libtool=PATH],
yann@2834
   242
                       [Specify the full PATH to GNU libtool >= 1.5.26]),
yann@2834
   243
        [ac_cv_path_LIBTOOL=$withval])])
yann@2834
   244
AC_CACHE_CHECK([for GNU libtool >= 1.5.26], [ac_cv_path_LIBTOOL],
andreas@3296
   245
    [AC_PATH_PROGS_FEATURE_CHECK([LIBTOOL], [glibtool libtool],
yann@2834
   246
        [[LIBTOOL_ver=$($ac_path_LIBTOOL --version 2>&1 \
yann@2834
   247
                        |$EGREP '\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)')
yann@2834
   248
          test -n "$LIBTOOL_ver" && ac_cv_path_LIBTOOL=$ac_path_LIBTOOL ac_path_LIBTOOL_found=:]],
yann@2834
   249
        [AC_MSG_RESULT([no])
yann@2834
   250
         AC_MSG_ERROR([could not find GNU libtool >= 1.5.26])])])
yann@2834
   251
AC_SUBST([LIBTOOL], [$ac_cv_path_LIBTOOL])
yann@2834
   252
yann@2834
   253
#----------------------------------------
yann@2834
   254
# Check for libtoolize >= 1.5.26
yann@2834
   255
AC_CACHE_VAL([ac_cv_path_LIBTOOLIZE],
yann@2834
   256
    [AC_ARG_WITH([libtoolize],
yann@2834
   257
        AS_HELP_STRING([--with-libtoolize=PATH],
yann@2834
   258
                       [Specify the full PATH to GNU libtoolize >= 1.5.26]),
yann@2834
   259
        [ac_cv_path_LIBTOOLIZE=$withval])])
yann@2834
   260
AC_CACHE_CHECK([for GNU libtoolize >= 1.5.26], [ac_cv_path_LIBTOOLIZE],
andreas@3296
   261
    [AC_PATH_PROGS_FEATURE_CHECK([LIBTOOLIZE], [glibtoolize libtoolize],
yann@2834
   262
        [[LIBTOOLIZE_ver=$($ac_path_LIBTOOLIZE --version 2>&1 \
yann@2834
   263
                        |$EGREP '\(GNU libtool.*\) (2[[:digit:]]*\.|1\.6[[:digit:]]*\.|1\.5\.[2-9][[:digit:]]+)')
yann@2834
   264
          test -n "$LIBTOOLIZE_ver" && ac_cv_path_LIBTOOLIZE=$ac_path_LIBTOOLIZE ac_path_LIBTOOLIZE_found=:]],
yann@2834
   265
        [AC_MSG_RESULT([no])
yann@2834
   266
         AC_MSG_ERROR([could not find GNU libtoolize >= 1.5.26])])])
yann@2834
   267
AC_SUBST([LIBTOOLIZE], [$ac_cv_path_LIBTOOLIZE])
yann@2834
   268
yann@2834
   269
#----------------------------------------
yann@2834
   270
# Check for automake >= 1.10
yann@2834
   271
AC_CACHE_VAL([ac_cv_path_automake],
yann@2834
   272
    [AC_ARG_WITH([automake],
yann@2834
   273
        AS_HELP_STRING([--with-automake=PATH],
yann@2834
   274
                       [Specify the full PATH to GNU automake >= 1.10]),
yann@2834
   275
        [ac_cv_path_automake=$withval])])
yann@2834
   276
AC_CACHE_CHECK([for GNU automake >= 1.10], [ac_cv_path_automake],
yann@2834
   277
    [AC_PATH_PROGS_FEATURE_CHECK([automake], [automake],
yann@2834
   278
        [[automake_ver=$($ac_path_automake --version 2>&1 \
yann@2834
   279
                         |$EGREP '\(GNU automake\) (1\.[[:digit:]]{2,}|[2-9][[:digit:]]*\.)')
yann@2834
   280
          test -n "$automake_ver" && ac_cv_path_automake=$ac_path_automake ac_path_automake_found=:]],
yann@2834
   281
        [AC_MSG_RESULT([no])
yann@2834
   282
         AC_MSG_ERROR([could not find GNU automake >= 1.10])])])
yann@2834
   283
AC_SUBST([automake], [$ac_cv_path_automake])
yann@2834
   284
yann@2834
   285
#--------------------------------------------------------------------
yann@2834
   286
# Boring again... But still a bit of work to do...
yann@2834
   287
#--------------------------------------------------------------------
yann@2834
   288
AC_SUBST([kconfig_options])
yann@2834
   289
yann@2834
   290
#----------------------------------------
yann@2834
   291
AC_CHECK_PROGS([xz],   [xz])
yann@2834
   292
ACX_SET_KCONFIG_OPTION([xz])
yann@2834
   293
AS_IF(
yann@2834
   294
    [test -z "$xz"],
yann@2834
   295
    [AC_CHECK_PROGS([lzma], [lzma])])
yann@2834
   296
ACX_SET_KCONFIG_OPTION([lzma])
yann@2834
   297
yann@2834
   298
#----------------------------------------
yann@2834
   299
AC_CHECK_PROGS([cvs], [cvs])
yann@2834
   300
ACX_SET_KCONFIG_OPTION([cvs])
yann@2834
   301
yann@2834
   302
#----------------------------------------
yann@2834
   303
AC_CHECK_PROGS([svn], [svn])
yann@2834
   304
ACX_SET_KCONFIG_OPTION([svn])
yann@2834
   305
yann@2834
   306
#--------------------------------------------------------------------
yann@2834
   307
# Now, for some fun...
yann@2834
   308
#--------------------------------------------------------------------
yann@2834
   309
AC_C_INLINE
yann@2834
   310
AC_HEADER_STDC
yann@2834
   311
AC_FUNC_MALLOC
yann@2834
   312
AC_FUNC_REALLOC
yann@2834
   313
AC_FUNC_ALLOCA
yann@2835
   314
yann@2835
   315
#----------------------------------------
yann@2835
   316
# Check for gettext, for the kconfig frontends
yann@2835
   317
AC_SUBST([gettext])
yann@2835
   318
AC_CHECK_HEADERS(
yann@2835
   319
    [libintl.h],
yann@2835
   320
    [ac_ct_gettext_hdr=$ac_header; break])
yann@2835
   321
AS_IF(
yann@2835
   322
    [test -n "$ac_ct_gettext_hdr"],
yann@2835
   323
    [AC_CHECK_DECL(
yann@2966
   324
        [gettext],
yann@2966
   325
        [gettext=y],,
yann@2966
   326
        [AC_INCLUDES_DEFAULT()
yann@2966
   327
         #include <$ac_ct_gettext_hdr>])])
yann@2835
   328
yann@2835
   329
#----------------------------------------
yann@2835
   330
# Check for ncurses, for the kconfig frontends
yann@2835
   331
AC_SUBST([ac_ct_curses_hdr])
yann@2834
   332
AC_CHECK_HEADERS(
yann@2834
   333
    [ncurses/ncurses.h ncurses/curses.h ncursesw/curses.h ncurses.h curses.h],
yann@2835
   334
    [ac_ct_curses_hdr=$ac_header; break])
yann@2834
   335
AS_IF(
yann@2835
   336
    [test -z "$ac_ct_curses_hdr"],
yann@2834
   337
    [AC_MSG_ERROR([could not find curses header, required for the kconfig frontends])])
yann@2834
   338
AC_SEARCH_LIBS(
yann@2834
   339
    [initscr],
yann@2834
   340
    [ncursesw ncurses curses],
yann@2834
   341
    [ac_ct_curses_lib_found=yes; break])
yann@2834
   342
AS_IF(
yann@2834
   343
    [test -z "$ac_ct_curses_lib_found"],
yann@2834
   344
    [AC_MSG_ERROR([could not find curses library, required for the kconfig frontends])])
yann@2834
   345
yann@2834
   346
#--------------------------------------------------------------------
yann@2834
   347
# Lastly, take care of crosstool-NG internal values
yann@2834
   348
#--------------------------------------------------------------------
yann@2834
   349
# Hey! We need the date! :-)
yann@2834
   350
AC_SUBST(
yann@2834
   351
    [DATE],
yann@2834
   352
    [$(date +%Y%m%d)])
yann@2834
   353
yann@2834
   354
# Decorate the version string if needed
yann@2834
   355
AS_IF(
yann@2834
   356
    [test -f version.sh -a -x version.sh],
yann@2834
   357
    [V=$(./version.sh "${PACKAGE_VERSION}")])
yann@2834
   358
AS_IF(
yann@2834
   359
    [test -n "${V}"],
yann@2834
   360
    [PACKAGE_VERSION="${V}"],
yann@2834
   361
    [AS_CASE(
yann@2834
   362
        [${PACKAGE_VERSION}],
yann@2834
   363
        [hg|*+hg],
yann@2834
   364
        [rev_id="$( hg log -r . --template '{branch}-{node|short}\n' \
yann@2834
   365
                           2>/dev/null                               \
yann@2834
   366
                    || true                                          )"
benoit@2860
   367
         PACKAGE_VERSION="${PACKAGE_VERSION}+${rev_id:-unknown-$( date +%Y%m%d.%H%M%S )}"
yann@2834
   368
        ])])
yann@2834
   369
# Arrange to have no / in the directory name, no need to create an
yann@2834
   370
# arbitrarily deep directory structure
yann@2834
   371
[PACKAGE_VERSION="$( printf "${PACKAGE_VERSION}\n" |"${SED}" -r -e 's:/+:_:g;' )"]
yann@2834
   372
yann@2834
   373
# Handle the local case
yann@2834
   374
AC_SUBST([sublibdir])
yann@2834
   375
AC_SUBST([subdocdir])
yann@2834
   376
AS_IF(
yann@2834
   377
    [test "x$enable_local" = "xyes"],
yann@2834
   378
    [AC_MSG_NOTICE([overiding all of --prefix and the likes, because --enable-local was set])
yann@2834
   379
     prefix=$(pwd)
yann@2834
   380
     exec_prefix="$prefix"
yann@2834
   381
     bindir="$prefix"
yann@2834
   382
     libdir="$prefix"
yann@2834
   383
     sublibdir=""
yann@2834
   384
     docdir="$prefix""/docs"
yann@2834
   385
     subdocdir=""
yann@2834
   386
     datarootdir="$prefix"
yann@2834
   387
     mandir="$docdir"],
yann@2834
   388
    [sublibdir="/ct-ng.\${VERSION}"
yann@2834
   389
     subdocdir="/ct-ng.\${VERSION}"])
yann@2834
   390
yann@2834
   391
#--------------------------------------------------------------------
yann@2834
   392
# Finally, generate the output file(s)
yann@2834
   393
#--------------------------------------------------------------------
yann@2834
   394
AC_CONFIG_FILES([Makefile])
yann@2834
   395
AC_OUTPUT