From a66ef46e59254745aa554a60bb136e737921bc11 Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Wed, 25 Dec 2019 16:02:45 +0100 Subject: [PATCH] initialize Signed-off-by: Michael Rasmussen --- configure.ac | 18 +++++++++--------- src/Makefile.am | 6 +++--- src/{vcard-test.c => vcard-example.c} | 0 3 files changed, 12 insertions(+), 12 deletions(-) rename src/{vcard-test.c => vcard-example.c} (100%) diff --git a/configure.ac b/configure.ac index 92465fc..5c91393 100644 --- a/configure.ac +++ b/configure.ac @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(llist, 0.1, mir@datanom.net) -AC_CONFIG_SRCDIR(src/main.c) +AC_INIT(libvcard, 0.1, mir@datanom.net) +AC_CONFIG_SRCDIR(src/vcard.c) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE AC_CONFIG_HEADER([config.h]) @@ -46,18 +46,16 @@ AC_TYPE_SSIZE_T # Optional building instructions if test $USE_MAINTAINER_MODE = yes; then CFLAGS="$CFLAGS -g -Werror" - LIBS="$LIBS" - DEBUG="YES" + LIBS="$GLIB_LIBS" else CFLAGS="$CFLAGS -O -O2" - LIBS="$LIBS" - DEBUG="NO" + LIBS="$GLIB_LIBS" fi -AC_ARG_ENABLE(example, +ac_enable_example="no" +AC_ARG_ENABLE([example], [AC_HELP_STRING([--enable-example],[Build example [default=no]])], - [ac_enable_example=$enableval], - [ac_enable_example=no]) + [ac_enable_example="${enableval}"]) AC_MSG_CHECKING([whether to compile the example application]) if test x"$ac_enable_example" = xyes; then @@ -73,6 +71,7 @@ AC_CONFIG_COMMANDS( echo -e "libvcard will be compiled with these settings:" echo -e "\tCFLAGS:\t\t${CFLAGS}" echo -e "\tLIBS:\t\t${LIBS}" + echo -e "\tExample:\t${EXAMPLE}" echo "" echo -e "Now run make to build library" echo "" @@ -82,6 +81,7 @@ AC_CONFIG_COMMANDS( [ CFLAGS="$CFLAGS" LIBS="$LIBS" + EXAMPLE="$ac_enable_example" ] ) diff --git a/src/Makefile.am b/src/Makefile.am index 3e9af86..756e8fc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,8 +16,8 @@ libvcard_la_LIBADD = \ @GLIB_LIBS@ if BUILD_EXAMPLE -bin_PROGRAMS = vcard-test -vcard_SOURCES = vcard-test.c -vcard_LDADD = libvcard.la +bin_PROGRAMS = vcard-example +vcard_example_SOURCES = vcard-example.c +vcard_example_LDADD = libvcard.la endif diff --git a/src/vcard-test.c b/src/vcard-example.c similarity index 100% rename from src/vcard-test.c rename to src/vcard-example.c -- 2.39.2