Undo test commit.
[seven-1.x.git] / aclocal.m4
bloba0bce6b15a5e492cc1e7b3eed43ba17f64267cf1
1 AC_DEFUN([AC_DEFINE_DIR], [
2   test "x$prefix" = xNONE && prefix="$ac_default_prefix"
3   test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4   ac_define_dir=`eval echo [$]$2`
5   ac_define_dir=`eval echo [$]ac_define_dir`
6   $1="$ac_define_dir"
7   AC_SUBST($1)
8   ifelse($3, ,
9     AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
10     AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
13 AC_DEFUN([AC_SUBST_DIR], [
14         ifelse($2,,,$1="[$]$2")
15         $1=`(
16             test "x$prefix" = xNONE && prefix="$ac_default_prefix"
17             test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
18             eval echo \""[$]$1"\"
19         )`
20         AC_SUBST($1)
23 dnl SEVEN_C_GCC_TRY_FLAGS(<warnings>,<cachevar>)
24 AC_DEFUN([SEVEN_C_GCC_TRY_FLAGS],[
25  AC_MSG_CHECKING([GCC flag(s) $1])
26  if test "${GCC-no}" = yes
27  then
28   AC_CACHE_VAL($2,[
29    oldcflags="${CFLAGS-}"
30    CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
31    AC_TRY_COMPILE([
32 #include <string.h>
33 #include <stdio.h>
34 int main(void);
35 ],[
36     strcmp("a","b"); fprintf(stdout,"test ok\n");
37 ], [$2=yes], [$2=no])
38    CFLAGS="${oldcflags}"])
39   if test "x$$2" = xyes; then
40    CWARNS="${CWARNS}$1 "
41    AC_MSG_RESULT(ok)  
42   else
43    $2=''
44    AC_MSG_RESULT(no)
45   fi
46  else
47   AC_MSG_RESULT(no, not using GCC)
48  fi