bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for regex.m4


From: James Gallagher
Subject: patch for regex.m4
Date: Mon, 25 Jul 2005 12:41:51 -0600
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)

Hi,

I'm including a patch for regex.m4. I replaced AC_TRY_RUN with AC_RUN_IFELSE and removed the use of m4_syscmd/m4_sysval.

The program was wrapped in [[ ... ]] which caused an error on Mac OS/X 10.3 with recent versions of autoconf/make/libtool (2.59, 1.9.6, 1.5.8, resp.). I added AC_LANG_SOURCE to fix the error and figured I might as well make the switch to RUN_IFELSE at the same time since the docs say TRY_RUN is obsolete.

I removed m4_syscmd, ..., because they were not working on either Mac OS/X or RHEL3.

I tested this patch on Mac OS/X, RHEL 3 and FC3.

James

*** m4/regex.m4 2005-07-07 02:08:39.000000000 -0600
--- ../libdap/gl/m4/regex.m4    2005-07-25 11:59:43.000000000 -0600
***************
*** 36,42 ****
      # test #75' in grep-2.3.
      AC_CACHE_CHECK([for working re_compile_pattern],
                   [gl_cv_func_working_re_compile_pattern],
!       [AC_TRY_RUN(
         [[
  #include <stdio.h>
  #include <string.h>
--- 36,42 ----
      # test #75' in grep-2.3.
      AC_CACHE_CHECK([for working re_compile_pattern],
                   [gl_cv_func_working_re_compile_pattern],
!       [AC_RUN_IFELSE(AC_LANG_SOURCE(
         [[
  #include <stdio.h>
  #include <string.h>
***************
*** 100,118 ****
  
            exit (0);
          }
!        ]],
         [gl_cv_func_working_re_compile_pattern=yes],
         [gl_cv_func_working_re_compile_pattern=no],
         dnl When crosscompiling, assume it is broken.
         [gl_cv_func_working_re_compile_pattern=no])])
      if test $gl_cv_func_working_re_compile_pattern = yes; then
        ac_use_included_regex=no
      fi
  
!     test -n "$1" || AC_MSG_ERROR([missing argument])
!     m4_syscmd([test -f '$1'])
!     ifelse(m4_sysval, 0,
!       [
        AC_ARG_WITH([included-regex],
          [  --without-included-regex don't compile regex; this is the default 
on
                            systems with recent-enough versions of the GNU C
--- 100,116 ----
  
            exit (0);
          }
!        ]]),
         [gl_cv_func_working_re_compile_pattern=yes],
         [gl_cv_func_working_re_compile_pattern=no],
         dnl When crosscompiling, assume it is broken.
         [gl_cv_func_working_re_compile_pattern=no])])
+ 
      if test $gl_cv_func_working_re_compile_pattern = yes; then
        ac_use_included_regex=no
      fi
  
!     if test -n "$1" || AC_MSG_ERROR([missing argument]); then
        AC_ARG_WITH([included-regex],
          [  --without-included-regex don't compile regex; this is the default 
on
                            systems with recent-enough versions of the GNU C
***************
*** 123,130 ****
          AC_LIBOBJ([regex])
          gl_PREREQ_REGEX
        fi
!       ],
!     )
    ]
  )
  
--- 121,129 ----
          AC_LIBOBJ([regex])
          gl_PREREQ_REGEX
        fi
! 
!     fi
! 
    ]
  )
  

Attachment: jgallagher.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]