/[soapbox]/obex-data-server/tags/REL-0_4_2/acinclude.m4
ViewVC logotype

Contents of /obex-data-server/tags/REL-0_4_2/acinclude.m4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2091 - (show annotations)
Sat Nov 1 18:01:23 2008 UTC (22 months, 1 week ago) by tadas
File size: 1094 byte(s)
Release 0.4.2
1 dnl as-ac-expand.m4 0.1.0
2 dnl autostars m4 macro for expanding directories using configure's prefix
3 dnl thomas@apestaart.org
4
5 dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
6 dnl
7 dnl example
8 dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
9 dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
10
11 AC_DEFUN([AS_AC_EXPAND],
12 [
13 EXP_VAR=[$1]
14 FROM_VAR=[$2]
15
16 dnl first expand prefix and exec_prefix if necessary
17 prefix_save=$prefix
18 exec_prefix_save=$exec_prefix
19
20 dnl if no prefix given, then use /usr/local, the default prefix
21 if test "x$prefix" = "xNONE"; then
22 prefix=$ac_default_prefix
23 fi
24 dnl if no exec_prefix given, then use prefix
25 if test "x$exec_prefix" = "xNONE"; then
26 exec_prefix=$prefix
27 fi
28
29 full_var="$FROM_VAR"
30 dnl loop until it doesn't change anymore
31 while true; do
32 new_full_var="`eval echo $full_var`"
33 if test "x$new_full_var"="x$full_var"; then break; fi
34 full_var=$new_full_var
35 done
36
37 dnl clean up
38 full_var=$new_full_var
39 AC_SUBST([$1], "$full_var")
40
41 dnl restore prefix and exec_prefix
42 prefix=$prefix_save
43 exec_prefix=$exec_prefix_save
44 ])

tadas_AT_dailyda_DOT_com
ViewVC Help
Powered by ViewVC 1.1.7