changeset 15130:34dd4b9c2452

tsearch: Move AC_LIBOBJ invocations to module description. * m4/tsearch.m4 (gl_FUNC_TSEARCH): Move AC_LIBOBJ and gl_PREREQ_TSEARCH invocations from here... * modules/tsearch (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 17:08:59 +0200
parents 9d42c63bc50d
children 9ed2584c6e17
files ChangeLog m4/tsearch.m4 modules/tsearch
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	tsearch: Move AC_LIBOBJ invocations to module description.
+	* m4/tsearch.m4 (gl_FUNC_TSEARCH): Move AC_LIBOBJ and gl_PREREQ_TSEARCH
+	invocations from here...
+	* modules/tsearch (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
 	towctrans: Move AC_LIBOBJ invocations to module description.
--- a/m4/tsearch.m4
+++ b/m4/tsearch.m4
@@ -1,4 +1,4 @@
-# tsearch.m4 serial 5
+# tsearch.m4 serial 6
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -46,14 +46,10 @@
     case "$gl_cv_func_tdelete_works" in
       *no)
         REPLACE_TSEARCH=1
-        AC_LIBOBJ([tsearch])
-        gl_PREREQ_TSEARCH
         ;;
     esac
   else
     HAVE_TSEARCH=0
-    AC_LIBOBJ([tsearch])
-    gl_PREREQ_TSEARCH
   fi
 ])
 
--- a/modules/tsearch
+++ b/modules/tsearch
@@ -10,6 +10,10 @@
 
 configure.ac:
 gl_FUNC_TSEARCH
+if test $HAVE_TSEARCH = 0 || test $REPLACE_TSEARCH = 1; then
+  AC_LIBOBJ([tsearch])
+  gl_PREREQ_TSEARCH
+fi
 gl_SEARCH_MODULE_INDICATOR([tsearch])
 
 Makefile.am: