1 # based on AC_DEFINE_DIR from
2 # http://autoconf-archive.cryp.to/ac_define_dir.html
4 # This macro _AC_DEFINEs variables to the expansion of
5 # installation directories variables, taking care of
6 # fixing up ${prefix} and such.
8 # The exported variables are offered as both a C preprocessor
9 # symbol (through config.h or similar) and an output variable
10 # (which can be used as output from configure). They're named
11 # after the original name, but using upper-case.
13 # a double eval is used because starting on autoconf 2.60 some
14 # variables reference other variables, so it's better to be on
18 AC_DEFUN([AC_DEVEL_DEFINE_INSTALL_DIRS], [
21 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
22 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
24 eval ac_define_dir="$bindir"
25 eval ac_define_dir="\"$ac_define_dir\""
26 AC_SUBST(BINDIR, "$ac_define_dir")
27 AC_DEFINE_UNQUOTED(BINDIR, "$ac_define_dir",
28 [dir for installing executables that users
29 run. Example: /usr/local/bin])
30 eval ac_define_dir="$datadir"
31 eval ac_define_dir="\"$ac_define_dir\""
32 AC_SUBST(DATADIR, "$ac_define_dir")
33 AC_DEFINE_UNQUOTED(DATADIR, "$ac_define_dir",
34 [dir for installing modifiable single-machine
35 data. Example: /usr/local/share])
36 eval ac_define_dir="$prefix"
37 eval ac_define_dir="\"$ac_define_dir\""
38 AC_SUBST(PREFIX, "$ac_define_dir")
39 AC_DEFINE_UNQUOTED(PREFIX, "$ac_define_dir",
40 [installation prefix for all files.
42 eval ac_define_dir="$exec_prefix"
43 eval ac_define_dir="\"$ac_define_dir\""
44 AC_SUBST(EXEC_PREFIX, "$ac_define_dir")
45 AC_DEFINE_UNQUOTED(EXEC_PREFIX, "$ac_define_dir",
46 [installation prefix for architecture-dependent
47 files. Example: /usr/local])
48 eval ac_define_dir="$includedir"
49 eval ac_define_dir="\"$ac_define_dir\""
50 AC_SUBST(INCLUDEDIR, "$ac_define_dir")
51 AC_DEFINE_UNQUOTED(INCLUDEDIR, "$ac_define_dir",
52 [dir for installing C header files.
53 Example: /usr/local/include])
54 eval ac_define_dir="$libdir"
55 eval ac_define_dir="\"$ac_define_dir\""
56 AC_SUBST(LIBDIR, "$ac_define_dir")
57 AC_DEFINE_UNQUOTED(LIBDIR, "$ac_define_dir",
58 [dir for installing object code libraries.
59 Example: /usr/local/lib])
60 eval ac_define_dir="$libexecdir"
61 eval ac_define_dir="\"$ac_define_dir\""
62 AC_SUBST(LIBEXECDIR, "$ac_define_dir")
63 AC_DEFINE_UNQUOTED(LIBEXECDIR, "$ac_define_dir",
64 [dir for installing executables that other programs
65 run. Example: /usr/local/libexec])
66 eval ac_define_dir="$localstatedir"
67 eval ac_define_dir="\"$ac_define_dir\""
68 AC_SUBST(LOCALSTATEDIR, "$ac_define_dir")
69 AC_DEFINE_UNQUOTED(LOCALSTATEDIR, "$ac_define_dir",
70 [dir for installing modifiable single-machine data.
71 Examples: /usr/local/var, /var])
72 eval ac_define_dir="$sbindir"
73 eval ac_define_dir="\"$ac_define_dir\""
74 AC_SUBST(SBINDIR, "$ac_define_dir")
75 AC_DEFINE_UNQUOTED(SBINDIR, "$ac_define_dir",
76 [dir for installing executables that sys-admins
77 run. Example: /usr/local/sbin])
78 eval ac_define_dir="$sharedstatedir"
79 eval ac_define_dir="\"$ac_define_dir\""
80 AC_SUBST(SHAREDSTATEDIR, "$ac_define_dir")
81 AC_DEFINE_UNQUOTED(SHAREDSTATEDIR, "$ac_define_dir",
82 [dir for installing modifiable architecture-independent
83 data. Example: /usr/local/com])
84 eval ac_define_dir="$sysconfdir"
85 eval ac_define_dir="\"$ac_define_dir\""
86 AC_SUBST(SYSCONFDIR, "$ac_define_dir")
87 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$ac_define_dir",
88 [dir for installing read-only single-machine data.
89 Examples: /usr/local/etc, /etc])
90 eval ac_define_dir="$mandir"
91 eval ac_define_dir="\"$ac_define_dir\""
92 AC_SUBST(MANDIR, "$ac_define_dir")
93 AC_DEFINE_UNQUOTED(MANDIR, "$ac_define_dir",
94 [top-level dir for installing documentation in man format.
95 Example: /usr/local/man])
96 eval ac_define_dir="$infodir"
97 eval ac_define_dir="\"$ac_define_dir\""
98 AC_SUBST(INFODIR, "$ac_define_dir")
99 AC_DEFINE_UNQUOTED(INFODIR, "$ac_define_dir",
100 [top-level dir for installing documentation in info format.
101 Example: /usr/local/info])
103 test "$prefix_NONE" && prefix=NONE
104 test "$exec_prefix_NONE" && exec_prefix=NONE