X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=configure.ac;h=500765b74efc1244ee9c4627702cf9773c935d30;hb=eb6adb25b8492bcfd0e72153708166563a109015;hp=e63477bf4af868e3daa3038209c248a0ca137309;hpb=0d31b2dae761b34ba322f701ad219e8db0a63001;p=ust.git diff --git a/configure.ac b/configure.ac index e63477b..500765b 100644 --- a/configure.ac +++ b/configure.ac @@ -3,9 +3,10 @@ #AC_PREREQ([2.63]) AC_INIT([ust], [0.0], [pierre-marc dot fournier at polymtl dot ca]) -AC_CONFIG_AUX_DIR(make_scripts) -AM_INIT_AUTOMAKE([0.0 foreign]) -AC_CONFIG_SRCDIR([ust/localerr.h]) +AC_CONFIG_AUX_DIR([config]) +AC_CONFIG_MACRO_DIR([m4]) +AM_INIT_AUTOMAKE([0.0 foreign dist-bzip2 no-dist-gzip]) +AC_CONFIG_SRCDIR([ust/ust.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. @@ -49,21 +50,42 @@ AC_C_INLINE AC_FUNC_MALLOC AC_CHECK_FUNCS([gettimeofday munmap socket strerror strtol]) -AC_ARG_WITH(urcu, [ --with-urcu path Path to userspace RCU library source], URCU_PATH="$withval", AC_MSG_ERROR([Must specify liburcu path.])) -AC_CHECK_FILE("$URCU_PATH/urcu.h", , AC_MSG_ERROR([Cannot find urcu.h in liburcu directory])) -AC_ARG_WITH(kcompat, [ --with-kcompat path Path to libkcompat source], KCOMPAT_PATH="$withval", AC_MSG_ERROR([Must specify libkcompat path.])) -AC_CHECK_FILE("$KCOMPAT_PATH/kcompat.h", , AC_MSG_ERROR([Cannot find kcompat.h in libkcompat directory])) -AC_SUBST(URCU_PATH) -AC_SUBST(KCOMPAT_PATH) +AC_ARG_WITH(urcu, [ --with-urcu path Path to userspace RCU source], [ + AC_CHECK_FILE(["$withval/urcu.h"], [ + URCU_CFLAGS="-I$withval" + URCU_LIBS="-L$withval -lurcu" ], + AC_MSG_ERROR([Cannot find urcu.h in urcu directory])) +], [ + PKG_CHECK_MODULES(URCU, [liburcu], , [ + AC_MSG_ERROR([Must specify urcu path.])]) +]) +AC_SUBST(URCU_CFLAGS) +AC_SUBST(URCU_LIBS) -#AC_CONFIG_FILES([Makefile -# hello/Makefile -# libmallocwrap/Makefile -# libmarkers/Makefile -# libtracectl/Makefile -# libtracing/Makefile -# ust/Makefile -# ustd/Makefile]) +AC_ARG_WITH(kcompat, [ --with-kcompat path Path to userspace kcompat source +], [ + AC_CHECK_FILE("$withval/kcompat.h", [ + KCOMPAT_CFLAGS="-I$withval $URCU_CFLAGS" + KCOMPAT_LIBS= + ], AC_MSG_ERROR([Cannot find kcompat.h in kcompat directory])) +], [ + PKG_CHECK_MODULES(KCOMPAT, [libkcompat], , [ + AC_MSG_ERROR([Must specify kcompat path.])]) +]) +AC_SUBST(KCOMPAT_CFLAGS) +AC_SUBST(KCOMPAT_LIBS) -AC_CONFIG_FILES([Makefile libust/Makefile hello/Makefile libmallocwrap/Makefile ustd/Makefile ust/Makefile]) +AC_CONFIG_FILES([ + Makefile + libust/Makefile + tests/Makefile + tests/hello/Makefile + tests/hello2/Makefile + tests/basic/Makefile + tests/basic_long/Makefile + libmallocwrap/Makefile + libinterfork/Makefile + ustd/Makefile + ust/Makefile +]) AC_OUTPUT