sendmail transition: Do not pre-generate sendmail.cf
[dragonfly.git] / contrib / sendmail-8.14 / devtools / M4 / UNIX / sm-test.m4
1 divert(-1)
2 #
3 # Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
4 #       All rights reserved.
5 #
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.
9 #
10 #       Compile/run a test program for libsm.
11 #
12 #       $Id: sm-test.m4,v 1.7 2002/02/01 17:38:07 ca Exp $
13 #
14 define(`smtest',
15 `bldPUSH_TARGET($1)dnl
16 bldLIST_PUSH_ITEM(`bldC_PRODUCTS', $1)dnl
17 bldPUSH_CLEAN_TARGET($1`-clean')dnl
18 divert(bldTARGETS_SECTION)
19 $1`'SRCS=$1.c
20 $1: ${BEFORE} $1.o ifdef(`confREQUIRE_LIBSM', `libsm.a')
21         ${CC} -o $1 ${LDOPTS} ${LIBDIRS} $1.o ifdef(`confREQUIRE_LIBSM', `libsm.a') ${LIBS}
22 ifelse(len(X`'$2), `1', `', `
23         @echo ============================================================
24         ./$1
25         @echo ============================================================')
26 $1-clean:
27         rm -f $1 $1.o
28 divert(0)')