From d950cdec3b3261fe8ca8723b9d4203ae09bbdac3 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 25 Aug 2008 22:15:48 +0200 Subject: More checks in ./configure --- configure.in | 19 ++++++++++++++++--- libpiano/configure.in | 12 ++++++++++++ libwardrobe/configure.in | 14 ++++++++++++++ src/Makefile.am | 4 ++-- 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index f4f1c7d..8218098 100644 --- a/configure.in +++ b/configure.in @@ -1,8 +1,11 @@ +# initizalize +AC_PREREQ(2.62) AC_INIT([pianobar], [0.1], [PromyLOPh@gmail.com]) AC_CONFIG_SRCDIR([src/main.c]) AM_CONFIG_HEADER([src/config.h]) AM_INIT_AUTOMAKE([-Wall]) +# progs AC_PROG_CC AM_PROG_CC_C_O AM_SANITY_CHECK @@ -10,6 +13,7 @@ AM_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +# libs PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) AC_SUBST(LIBCURL_CFLAGS) AC_SUBST(LIBCURL_LIBS) @@ -28,14 +32,23 @@ AC_SUBST(LIBFAAD_LIBS) AC_CHECK_LIB([readline], [readline], [LIBREADLINE_LIBS=-lreadline], AC_MSG_ERROR([readline is required. See INSTALL])) AC_SUBST(LIBREADLINE_LIBS) -# FIXME: check for pthread +AC_CHECK_LIB([m], [pow], [LIBM_LIBS=-lm], AC_MSG_ERROR([libm is required.])) +AC_SUBST(LIBM_LIBS) -AC_CHECK_HEADERS([stdlib.h string.h]) +AC_CHECK_LIB([pthread], [pthread_create], [LIBPTHREAD_LIBS=-lpthread], AC_MSG_ERROR([libpthread is required.])) +AC_SUBST(LIBPTHREAD_LIBS) -AC_CHECK_FUNCS([memset]) +# headers +AC_CHECK_HEADERS([stdlib.h string.h stdint.h termios.h unistd.h]) +# libc funcs +AC_CHECK_FUNCS([memset memmove strcasecmp]) + +# compiler characteristics +AC_C_INLINE AC_TYPE_SIZE_T +# output AC_CONFIG_FILES(Makefile src/Makefile) AC_CONFIG_SUBDIRS([libpiano libwardrobe]) diff --git a/libpiano/configure.in b/libpiano/configure.in index 9ad6541..5f9ada5 100644 --- a/libpiano/configure.in +++ b/libpiano/configure.in @@ -1,9 +1,12 @@ +# init +AC_PREREQ(2.62) AC_INIT([libpiano], [0.1], [PromyLOPh@gmail.com]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([src/main.c]) AM_CONFIG_HEADER([src/config.h]) AM_INIT_AUTOMAKE([-Wall]) +# progs AC_PROG_CC AM_PROG_CC_C_O AM_SANITY_CHECK @@ -11,6 +14,7 @@ AM_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +# libs PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) AC_SUBST(LIBCURL_CFLAGS) AC_SUBST(LIBCURL_LIBS) @@ -19,6 +23,14 @@ PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.31) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) +# headers +AC_CHECK_HEADERS([stdlib.h string.h]) + +# libc functions +AC_FUNC_REALLOC +AC_CHECK_FUNCS([memset strchr strdup]) + +# output AC_CONFIG_FILES(Makefile src/Makefile) AC_OUTPUT diff --git a/libwardrobe/configure.in b/libwardrobe/configure.in index 55ec57e..5556532 100644 --- a/libwardrobe/configure.in +++ b/libwardrobe/configure.in @@ -1,9 +1,12 @@ +# init +AC_PREREQ(2.62) AC_INIT([libwardrobe], [0.1], [PromyLOPh@gmail.com]) AC_CONFIG_AUX_DIR([.]) AC_CONFIG_SRCDIR([src/main.c]) AM_CONFIG_HEADER([src/config.h]) AM_INIT_AUTOMAKE([-Wall]) +# progs AC_PROG_CC AM_PROG_CC_C_O AM_SANITY_CHECK @@ -11,10 +14,21 @@ AM_PROG_LIBTOOL PKG_PROG_PKG_CONFIG +# libs PKG_CHECK_MODULES(LIBCURL, libcurl >= 7.18.0) AC_SUBST(LIBCURL_CFLAGS) AC_SUBST(LIBCURL_LIBS) +# headers +AC_CHECK_HEADERS([stdlib.h string.h]) + +# compiler characteristics +AC_TYPE_SIZE_T + +# libc functions +AC_CHECK_FUNCS([memset strchr strdup]) + +# output AC_CONFIG_FILES(Makefile src/Makefile) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index a796499..38dfd5f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,6 +5,6 @@ pianobar_SOURCES = main.c main.h terminal.c terminal.h settings.c settings.h \ pianobar_CPPFLAGS = ${LIBCURL_CFLAGS} ${LIBAO_CFLAGS} ${LIBXML_CFLAGS} \ -I../libpiano/src -I../libwardrobe/src pianobar_LDADD = ${LIBCURL_LIBS} ${LIBAO_LIBS} ${LIBFAAD_LIBS} \ - ${LIBREADLINE_LIBS} ${LIBXML_LIBS} -lpthread \ - ../libpiano/src/libpiano.la ../libwardrobe/src/libwardrobe.la -lm + ${LIBREADLINE_LIBS} ${LIBXML_LIBS} ${LIBPTHREAD_LIBS} ${LIBM_LIBS} \ + ../libpiano/src/libpiano.la ../libwardrobe/src/libwardrobe.la dist_man1_MANS = pianobar.1 -- cgit v1.2.3