3 # Copyright (c) 2006 Sendmail, Inc. and its suppliers.
6 # By using this file, you agree to the terms and conditions set
7 # forth in the LICENSE file which can be found at the top level of
8 # the sendmail distribution.
10 # Compile/run a test program.
12 # $Id: check.m4,v 8.5 2006/08/28 23:48:54 ca Exp $
14 define(`smcheck', `dnl
15 ifelse(X`'$2, `X', `', `ifelse(index($2, `run'), `-1', `', `dnl
16 bldLIST_PUSH_ITEM(`bldCHECK_TARGETS', $1)dnl
18 ifelse(X`'$2, `X', `', `ifelse(index($2, `compile'), `-1', `', `dnl
19 bldLIST_PUSH_ITEM(`bldC_CHECKS', $1)dnl
20 bldLIST_PUSH_ITEM(`bldCHECK_PROGRAMS', $1)dnl
21 bldPUSH_CLEAN_TARGET($1`-clean')dnl
22 divert(bldTARGETS_SECTION)
24 $1: ${BEFORE} $1.o ifdef(`confCHECK_LIBS', `confCHECK_LIBS')
25 ${CC} -o $1 ${LDOPTS} ${LIBDIRS} $1.o ifdef(`confCHECK_LIBS', `confCHECK_LIBS') ${LIBS}