libtool/replfunc.m4
Gordon Matzigkeit 4f7fb238bd Initial revision
1997-04-01 19:18:28 +00:00

56 lines
1.9 KiB
Plaintext

## replfunc.m4 - libtool-aware AM_REPLACE_FUNC macro and friends.
## Copyright (C) 1997 Free Software Foundation, Inc.
## Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1997
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##
## As a special exception to the GNU General Public License, if you
## distribute this file as part of a program that contains a
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 1 AM_REPLACE_FUNCS
dnl AM_REPLACE_FUNCS(FUNCTION...)
AC_DEFUN(AM_REPLACE_FUNCS,
[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.o"
LTLIBOBJS="$LTLIBOBJS ${ac_func}.lo"])
AC_SUBST(LIBOBJS)dnl
AC_SUBST(LTLIBOBJS)dnl
])
dnl AM_FUNC_ALLOCA
AC_DEFUN(AM_FUNC_ALLOCA,
[AC_REQUIRE([AC_FUNC_ALLOCA])dnl
test $ac_cv_func_alloca_works = no && LTALLOCA=alloca.lo
AC_SUBST(LTALLOCA)dnl
])
dnl AM_FUNC_MEMCMP
AC_DEFUN(AM_FUNC_MEMCMP,
[AC_REQUIRE([AC_FUNC_MEMCMP])dnl
test $ac_cv_func_memcmp_clean = no && LTLIBOBJS="$LTLIBOBJS memcmp.lo"
AC_SUBST(LTLIBOBJS)dnl
])
dnl AM_STRUCT_ST_BLOCKS
AC_DEFUN(AM_STRUCT_ST_BLOCKS,
[AC_REQUIRE([AC_STRUCT_ST_BLOCKS])dnl
test $ac_cv_struct_st_blocks = no && LTLIBOBJS="$LTLIBOBJS fileblocks.lo"
AC_SUBST(LTLIBOBJS)dnl
])