autoconf & automake

parent 9a9f17d1
all: proxy.c
$(CC) proxy.c $(CFLAGS) $(LDFLAGS) -lpaho-mqtt3cs -lczmq -lz -lssl -lcrypto -o sentinel-proxy
clean:
rm -f sentinel-proxy
bin_PROGRAMS = sentinel_proxy
sentinel_proxy_SOURCES = main.c
AC_INIT([sentinel-proxy], [1.0], [])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
])
AC_CHECK_LIB(crypto, PEM_read_X509, , [echo "Cannot find libcrypto"; exit -1])
AC_CHECK_LIB(z, compress2, , [echo "Cannot find libz"; exit -1])
AC_CHECK_LIB(czmq, zsock_new, , [echo "Cannot find libczmq"; exit -1])
AC_CHECK_LIB(paho-mqtt3cs, MQTTClient_create, , [echo "Cannot find libpaho-mqtt"; exit -1])
AC_OUTPUT
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment