changeset 15167:8750f2cdc4f1

Remove obsolete m4 macro OCTAVE_SMART_PUTENV. * configure.ac: Remove call to macro OCTAVE_SMART_PUTENV. * m4/acinclude.m4: Remove macro definition for OCTAVE_SMART_PUTENV.
author Rik <rik@octave.org>
date Mon, 13 Aug 2012 12:56:53 -0700
parents 84d7a1ed5f29
children 1c711a646fa7
files configure.ac m4/acinclude.m4
diffstat 2 files changed, 5 insertions(+), 77 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac
+++ b/configure.ac
@@ -2020,8 +2020,6 @@
   OCTAVE_CARBON_CGDISPLAYBITSPERPIXEL
 fi
 
-OCTAVE_SMART_PUTENV
-
 AC_CHECK_FUNCS(getpwnam, [], [AC_CHECK_LIB(sun, getpwnam)])
 
 AC_FUNC_CLOSEDIR_VOID
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -1672,22 +1672,20 @@
   dnl Get the cflags and libraries from the freetype-config script
   dnl
   AC_ARG_WITH([ft-prefix],
-    dnl don't quote AS_HELP_STRING!
-    AS_HELP_STRING([--with-ft-prefix=PREFIX],
-                   [Prefix where FreeType is installed (optional)]),
+    [AS_HELP_STRING([--with-ft-prefix=PREFIX],
+                   [Prefix where FreeType is installed (optional)])],
     [ft_config_prefix="$withval"],
     [ft_config_prefix=""])
  
   AC_ARG_WITH([ft-exec-prefix],
-    dnl don't quote AS_HELP_STRING!
-    AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
-                   [Exec prefix where FreeType is installed (optional)]),
+    [AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
+                   [Exec prefix where FreeType is installed (optional)])],
     [ft_config_exec_prefix="$withval"],
     [ft_config_exec_prefix=""])
 
   AC_ARG_ENABLE([freetypetest],
     [AS_HELP_STRING([--disable-freetypetest],
-                   [Do not try to compile and run a test FreeType program])],
+                    [Do not try to compile and run a test FreeType program])],
     [],
     [enable_fttest=yes])
 
@@ -2000,71 +1998,3 @@
 ])# PKG_CHECK_MODULES
 dnl end of pkg.m4
 
-dnl
-dnl The following test is from Karl Berry's Kpathsearch library.  I'm
-dnl including it here in case we someday want to make the use of
-dnl kpathsea optional.
-dnl
-dnl Some BSD putenv's, e.g., FreeBSD, do malloc/free's on the environment.
-dnl This test program is due to Mike Hibler <mike@cs.utah.edu>.
-dnl We don't actually need to run this if we don't have putenv, but it
-dnl doesn't hurt.
-dnl 
-AC_DEFUN([OCTAVE_SMART_PUTENV],
-[AC_MSG_CHECKING([whether putenv uses malloc])
-AC_CACHE_VAL(octave_cv_func_putenv_malloc,
-[AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#define VAR	"YOW_VAR"
-#define STRING1 "GabbaGabbaHey"
-#define STRING2 "Yow!!"		/* should be shorter than STRING1 */
-extern char *getenv (); /* in case char* and int don't mix gracefully */
-main ()
-{
-  char *str1, *rstr1, *str2, *rstr2;
-  str1 = getenv (VAR);
-  if (str1)
-    exit (1);
-  str1 = malloc (strlen (VAR) + 1 + strlen (STRING1) + 1);
-  if (str1 == 0)
-    exit (2);
-  strcpy (str1, VAR);
-  strcat (str1, "=");
-  strcat (str1, STRING1);
-  if (putenv (str1) < 0)
-    exit (3);
-  rstr1 = getenv (VAR);
-  if (rstr1 == 0)
-    exit (4);
-  rstr1 -= strlen (VAR) + 1;
-  if (strncmp (rstr1, VAR, strlen (VAR)))
-    exit (5);
-  str2 = malloc (strlen (VAR) + 1 + strlen (STRING2) + 1);
-  if (str2 == 0 || str1 == str2)
-    exit (6);
-  strcpy (str2, VAR);
-  strcat (str2, "=");
-  strcat (str2, STRING2);
-  if (putenv (str2) < 0)
-    exit (7);
-  rstr2 = getenv (VAR);
-  if (rstr2 == 0)
-    exit (8);
-  rstr2 -= strlen (VAR) + 1;
-#if 0
-  printf ("rstr1=0x%x, rstr2=0x%x\n", rstr1, rstr2);
-  /*
-   * If string from first call was reused for the second call,
-   * you had better not do a free on the first string!
-   */
-  if (rstr1 == rstr2)
-          printf ("#define SMART_PUTENV\n");
-  else
-          printf ("#undef SMART_PUTENV\n");
-#endif
-  exit (rstr1 == rstr2 ? 0 : 1);
-}]])], octave_cv_func_putenv_malloc=yes, octave_cv_func_putenv_malloc=no,
-    octave_cv_func_putenv_malloc=no)])dnl
-AC_MSG_RESULT([$octave_cv_func_putenv_malloc])
-if test $octave_cv_func_putenv_malloc = yes; then
-  AC_DEFINE(SMART_PUTENV,1,[To quiet autoheader.])
-fi])