• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/libiconv-1.14/libcharset/m4/
1# relocatable-lib.m4 serial 3
2dnl Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9dnl Support for relocatable libraries.
10AC_DEFUN([gl_RELOCATABLE_LIBRARY],
11[
12  AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
13  if test $RELOCATABLE = yes; then
14    AC_LIBOBJ([relocatable])
15  fi
16])
17AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
18[
19  AC_REQUIRE([gl_RELOCATABLE_NOP])
20  dnl Easier to put this here once, instead of into the DEFS of each Makefile.
21  if test "X$prefix" = "XNONE"; then
22    reloc_final_prefix="$ac_default_prefix"
23  else
24    reloc_final_prefix="$prefix"
25  fi
26  AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"],
27    [Define to the value of ${prefix}, as a string.])
28  if test $RELOCATABLE = yes; then
29    AC_DEFINE([ENABLE_RELOCATABLE], 1,
30      [Define to 1 if the package shall run at any location in the filesystem.])
31  fi
32])
33
34dnl Like gl_RELOCATABLE_LIBRARY, except prepare for separate compilation
35dnl (no AC_LIBOBJ).
36AC_DEFUN([gl_RELOCATABLE_LIBRARY_SEPARATE],
37[
38  AC_REQUIRE([gl_RELOCATABLE_LIBRARY_BODY])
39])
40
41dnl Support for relocatable packages for which it is a nop.
42AC_DEFUN([gl_RELOCATABLE_NOP],
43[
44  AC_MSG_CHECKING([whether to activate relocatable installation])
45  AC_ARG_ENABLE(relocatable,
46    [  --enable-relocatable    install a package that can be moved in the filesystem],
47    [if test "$enableval" != no; then
48       RELOCATABLE=yes
49     else
50       RELOCATABLE=no
51     fi
52    ], RELOCATABLE=no)
53  AC_SUBST(RELOCATABLE)
54  AC_MSG_RESULT([$RELOCATABLE])
55])
56
57