dnl CCAFE_AC_PREFIX(DEFAULT) dnl -------------------------------------------------------------------- dnl Side effects: updates all the prefix related variables using dnl DEFAULT if prefix has not been properly defined by now. dnl fully expands the values, too. dnl -------------------------------------------------------------------- AC_DEFUN(CCAFE_AC_PREFIX, [ if test -z "$1" ; then AC_MSG_ERROR([Ccafe_ac_prefix macro requires a default path.]) fi if test -z "$prefix" -o "$prefix" = "NONE"; then prefix=$1; fi if test -z "$datadir" -o "$datadir" = "NONE/share" -o "$datadir" = '${prefix}/share' ; then datadir="$prefix/share"; fi if test -z "$sysconfdir" -o "$sysconfdir" = "NONE/etc" -o "$sysconfdir" = '${prefix}/etc' ; then sysconfdir="$prefix/etc"; fi if test -z "$sharedstatedir" -o "$sharedstatedir" = "NONE/com" -o "$sharedstatedir" = '${prefix}/com' ; then sharedstatedir="$prefix/com"; fi if test -z "$localstatedir" -o "$localstatedir" = "NONE/var" -o "$localstatedir" = '${prefix}/var' ; then localstatedir="$prefix/var"; fi if test -z "$includedir" -o "$includedir" = "NONE/include" -o "$includedir" = '${prefix}/include' ; then includedir="$prefix/include"; fi if test -z "$infodir" -o "$infodir" = "NONE/info" -o "$infodir" = '${prefix}/info' ; then infodir="$prefix/info"; fi if test -z "$mandir" -o "$mandir" = "NONE/man" -o "$mandir" = '${prefix}/man' ; then mandir="$prefix/man"; fi ] ) dnl -------------------------------------------------------------------- dnl requires prefix be define, or does nothing. dnl -------------------------------------------------------------------- AC_DEFUN(CCAFE_AC_EXEC_PREFIX, [ if test -z "$1" ; then AC_MSG_ERROR([Ccafe_ac_exec_prefix macro requires a default path.]) fi if test -z "$exec_prefix" -o "$exec_prefix" = "NONE"; then exec_prefix=$1; fi if test -z "$bindir" -o "$bindir" = "NONE/bin" -o "$bindir" = '${exec_prefix}/bin' ; then bindir="$exec_prefix/bin"; fi if test -z "$sbindir" -o "$sbindir" = "NONE/sbin" -o "$sbindir" = '${exec_prefix}/sbin'; then sbindir="$exec_prefix/sbin"; fi if test -z "$libexecdir" -o "$libexecdir" = "NONE/libexec" -o "$libexecdir" = '${exec_prefix}/libexec' ; then libexecdir="$exec_prefix/libexec"; fi if test -z "$libdir" -o "$libdir" = "NONE/lib" -o "$libdir" = '${exec_prefix}/lib' ; then libdir="$exec_prefix/lib"; fi ] )