| 1 |
233 |
bertin |
dnl
|
| 2 |
|
|
dnl acx_urbi_resolve_dir.m4
|
| 3 |
|
|
dnl
|
| 4 |
|
|
dnl Enable a reasonable set of optimization flags for the C compiler.
|
| 5 |
|
|
dnl
|
| 6 |
|
|
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
| 7 |
|
|
dnl
|
| 8 |
|
|
dnl This file part of: AstrOmatic software
|
| 9 |
|
|
dnl
|
| 10 |
284 |
bertin |
dnl Copyrights: (C) 2007-2011 Emmanuel Bertin -- IAP/CNRS/UPMC
|
| 11 |
233 |
bertin |
dnl (C) 2007 Akim Demaille (original version)
|
| 12 |
|
|
dnl
|
| 13 |
|
|
dnl License: GPL
|
| 14 |
|
|
dnl
|
| 15 |
|
|
dnl AstrOmatic software is free software: you can redistribute it and/or
|
| 16 |
|
|
dnl modify it under the terms of the GNU General Public License as
|
| 17 |
|
|
dnl published by the Free Software Foundation, either version 3 of the
|
| 18 |
|
|
dnl License, or (at your option) any later version.
|
| 19 |
|
|
dnl AstrOmatic software is distributed in the hope that it will be useful,
|
| 20 |
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 21 |
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 22 |
|
|
dnl GNU General Public License for more details.
|
| 23 |
|
|
dnl You should have received a copy of the GNU General Public License
|
| 24 |
|
|
dnl along with AstrOmatic software.
|
| 25 |
|
|
dnl If not, see <http://www.gnu.org/licenses/>.
|
| 26 |
|
|
dnl
|
| 27 |
284 |
bertin |
dnl Last modified: 27/12/2011
|
| 28 |
233 |
bertin |
dnl
|
| 29 |
|
|
dnl %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
| 30 |
|
|
dnl
|
| 31 |
|
|
dnl @synopsis ACX_URBI_RESOLVE_DIR
|
| 32 |
|
|
dnl
|
| 33 |
|
|
dnl Return a directory with all inner variables expanded.
|
| 34 |
|
|
dnl Based on a macro kindly provided by Akim Demaille <akim@lrde.epita.fr>.
|
| 35 |
31 |
marmo |
|
| 36 |
|
|
# URBI_RESOLVE_DIR_PREPARE
|
| 37 |
|
|
# ------------------------
|
| 38 |
|
|
# Define urbi_resolve_dir.
|
| 39 |
|
|
m4_defun([URBI_RESOLVE_DIR_PREPARE],
|
| 40 |
|
|
[# PATH urbi_resolve_dir(DIR)
|
| 41 |
|
|
# --------------------------
|
| 42 |
233 |
bertin |
#
|
| 43 |
31 |
marmo |
urbi_resolve_dir ()
|
| 44 |
|
|
{
|
| 45 |
|
|
ac_$0_dir=$[]1
|
| 46 |
|
|
ac_$0_res=
|
| 47 |
|
|
ac_$0_prefix_NONE=
|
| 48 |
|
|
ac_$0_exec_prefix_NONE=
|
| 49 |
|
|
test "x$prefix" = xNONE &&
|
| 50 |
|
|
ac_$0_exec_prefix_NONE=yes &&
|
| 51 |
|
|
prefix=$ac_default_prefix
|
| 52 |
|
|
test "x$exec_prefix" = xNONE &&
|
| 53 |
|
|
ac_$0_exec_prefix_NONE=yes &&
|
| 54 |
|
|
exec_prefix=$prefix
|
| 55 |
|
|
while true
|
| 56 |
|
|
do
|
| 57 |
|
|
eval ac_$0_res="$ac_$0_dir"
|
| 58 |
284 |
bertin |
if test x"$ac_$0_dir" = x"$ac_$0_res"; then
|
| 59 |
31 |
marmo |
break
|
| 60 |
|
|
fi
|
| 61 |
|
|
ac_$0_dir=$ac_$0_res
|
| 62 |
|
|
done
|
| 63 |
|
|
test "$ac_$0_prefix_NONE" && prefix=NONE
|
| 64 |
|
|
test "$ac_$0_exec_prefix_NONE" && exec_prefix=NONE
|
| 65 |
|
|
echo "$ac_$0_res"
|
| 66 |
|
|
}
|
| 67 |
|
|
])
|
| 68 |
|
|
|
| 69 |
|
|
|
| 70 |
|
|
# PATH URBI_RESOLVE_DIR(DIR)
|
| 71 |
|
|
# --------------------------
|
| 72 |
|
|
# Return the DIR with all inner variables expanded.
|
| 73 |
|
|
AC_DEFUN([URBI_RESOLVE_DIR],
|
| 74 |
|
|
[AC_REQUIRE([URBI_RESOLVE_DIR_PREPARE])dnl
|
| 75 |
|
|
urbi_resolve_dir '$1'[]dnl
|
| 76 |
|
|
])
|
| 77 |
|
|
|
| 78 |
|
|
|
| 79 |
|
|
## Local Variables:
|
| 80 |
|
|
## mode: autoconf
|
| 81 |
|
|
## End:
|