Hi!

Thanks for the contribution.

It is too late for us to include brand new macros in Autoconf, we're
trying to rel*se it (hm, that word hurts :).  I'm unsure whether it
should also be integrated in Autoconf per se, it should probably first
live it's life on .

Just a few comments.

| @synonips RSSH_CHECK_SUNPROC_C([ACTION-IF-YES],[ACTION-IF-NOT])
| dnl check : are we using SUN workshop C compiler.
| dnl Corresponding cache value: rssh_cv_check_sunpro_c is set to yes or no.
| dnl
| dnl@author  Ruslan Shevchenko <[EMAIL PROTECTED]>, 1998, 2000
| dnl@version $Id: RSSH_CHECK_SUNPRO_C.m4,v 1.3 2000/07/07 16:11:56 rssh Exp $
| dnl
| dnl RSSH_CHECK_SUNPRO_C([ACTION-IF-YES],[ACTION-IF-NOT])
| dnl

Drop dnl dead.

| AC_DEFUN(RSSH_CHECK_SUNPRO_C,[

Quote all the args, included the name.

| AC_MSG_CHECKING( Are we use Sun Worckshop C compiler )

no spaces.

| AC_LANG_SAVE
| AC_LANG_C

CVS Autoconf uses AC_LANG_PUSH

| AC_CACHE_VAL(rssh_cv_check_sunpro_c,[

Merge all this into AC_CACHE_CHECK.

|   AC_TRY_COMPILE(,
| #ifndef __SUNPRO_C
| #error this is not Sun Workshop
| #endif
|     ,

This is underquoted, you're asking for troubles.  #error is not know
to be portable.  Indent the clauses.

|    rssh_cv_check_sunpro_c=yes,
|    rssh_cv_check_sunpro_c=no
|   )
| ])
| AC_LANG_RESTORE
| if test ${rssh_cv_check_sunpro_c} = yes

This is wrong: your action are inside the cache setting section, which
means the second time configure is run, the ACTIONS-IF won't be honored.

| then
|   [$1]
|   :

Overquoted.

| else
|   [$2]
|   :
| fi

Use AC_SHELL_IFELSE instead.

| AC_MSG_RESULT($rssh_cv_check_sunpro_c)
| ])dnl
| dnl
| dnl

Drop dnl even deader :)


# RSSH_CHECK_SUNPROC_C([ACTION-IF-YES], [ACTION-IF-NOT])
# ------------------------------------------------------
#  check : are we using SUN workshop C compiler.
#  Corresponding cache value: rssh_cv_check_sunpro_c is set to yes or no.
# 
# @author  Ruslan Shevchenko <[EMAIL PROTECTED]>, 1998, 2000
# @version $Id: RSSH_CHECK_SUNPRO_C.m4,v 1.3 2000/07/07 16:11:56 rssh Exp $
# 
#  RSSH_CHECK_SUNPRO_C([ACTION-IF-YES],[ACTION-IF-NOT])
# 
AC_DEFUN([RSSH_CHECK_SUNPRO_C],
[AC_CACHE_CHECK([whether using Sun Worckshop C compiler],
                [rssh_cv_check_sunpro_c],
[AC_LANG_PUSH(C)
AC_TRY_COMPILE([],
[#ifndef __SUNPRO_C
# include "error: this is not Sun Workshop."
#endif
],
               rssh_cv_check_sunpro_c=yes,
               rssh_cv_check_sunpro_c=no)
AC_LANG_POP])
AC_SHELL_IFELSE(test ${rssh_cv_check_sunpro_c} = yes, [$2], [$3])
])# RSSH_CHECK_SUNPROC_C

Reply via email to