changeset 15051:f3891cfd5901

mkstemp: Move AC_LIBOBJ invocations to module description. * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Move AC_LIBOBJ and gl_PREREQ_MKSTEMP invocations from here... * modules/mkstemp (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sat, 21 May 2011 16:00:00 +0200
parents 3d768a114180
children 248d56be0a25
files ChangeLog m4/mkstemp.m4 modules/mkstemp
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-21  Bruno Haible  <bruno@clisp.org>
+
+	mkstemp: Move AC_LIBOBJ invocations to module description.
+	* m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Move AC_LIBOBJ and
+	gl_PREREQ_MKSTEMP invocations from here...
+	* modules/mkstemp (configure.ac): ... to here.
+
 2011-05-21  Bruno Haible  <bruno@clisp.org>
 
 	mkostemps: Move AC_LIBOBJ invocations to module description.
--- a/m4/mkstemp.m4
+++ b/m4/mkstemp.m4
@@ -1,4 +1,4 @@
-#serial 20
+#serial 21
 
 # Copyright (C) 2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -61,13 +61,9 @@
       ])
     if test "$gl_cv_func_working_mkstemp" != yes; then
       REPLACE_MKSTEMP=1
-      AC_LIBOBJ([mkstemp])
-      gl_PREREQ_MKSTEMP
     fi
   else
     HAVE_MKSTEMP=0
-    AC_LIBOBJ([mkstemp])
-    gl_PREREQ_MKSTEMP
   fi
 ])
 
--- a/modules/mkstemp
+++ b/modules/mkstemp
@@ -12,6 +12,10 @@
 
 configure.ac:
 gl_FUNC_MKSTEMP
+if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
+  AC_LIBOBJ([mkstemp])
+  gl_PREREQ_MKSTEMP
+fi
 gl_STDLIB_MODULE_INDICATOR([mkstemp])
 
 Makefile.am: