From 2921aa87d5cea1f290dc39a77e420ff0c49156f8 Mon Sep 17 00:00:00 2001 From: Achim Gsell Date: Tue, 19 Jul 2011 13:10:36 +0000 Subject: [PATCH] adaptions for libtools on Mac, work around to use env.varibales removed --- Makefile.am | 2 ++ autogen.sh | 25 ++++++++++--------------- configure.ac | 48 ++---------------------------------------------- 3 files changed, 14 insertions(+), 61 deletions(-) diff --git a/Makefile.am b/Makefile.am index 49f9098..48b1381 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,5 @@ +ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = \ src \ test \ diff --git a/autogen.sh b/autogen.sh index c7e0f6a..134d2a0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,11 +1,18 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +LIBTOOLIZE=`which libtoolize` +if [ "$LIBTOOLIZE" = "" ]; then + LIBTOOLIZE=`which glibtoolize` +fi +if [ "$LIBTOOLIZE" = "" ]; then + echo "libtoolize not found" 1>&2 + exit 1 +fi + echo "+ making misc files ..." touch NEWS README AUTHORS ChangeLog echo -echo -echo echo "+ running aclocal ..." aclocal $ACLOCAL_FLAGS || { echo @@ -13,8 +20,6 @@ aclocal $ACLOCAL_FLAGS || { exit 1 } echo -echo -echo echo "+ running autoheader ... " autoheader || { echo @@ -22,17 +27,13 @@ autoheader || { exit 1 } echo -echo -echo echo "+ running libtoolize ... " -libtoolize --force || { +$LIBTOOLIZE --force || { echo echo "libtoolize failed" exit 1 } echo -echo -echo echo "+ running autoconf ... " autoconf || { echo @@ -40,15 +41,9 @@ autoconf || { exit 1 } echo -echo -echo echo "+ running automake ... " automake -a -c --foreign || { echo echo "automake failed" exit 1 } -echo -echo -echo - diff --git a/configure.ac b/configure.ac index df80fe1..a9a742d 100644 --- a/configure.ac +++ b/configure.ac @@ -13,6 +13,8 @@ AC_PREREQ(2.59) # The AC_CONFIG_HEADERS macro selects this kind of output. AC_CONFIG_HEADERS(config.h) +AC_CONFIG_MACRO_DIR([m4]) + # AM_INIT_AUTOMAKE is required to use autoconf with automake AM_INIT_AUTOMAKE @@ -59,18 +61,6 @@ AC_ARG_WITH( [path to lustre user API [default=""]])], [LUSTREPATH=$withval], [LUSTREPATH=""]) -############################################################################### -################# A SIMPLE WORK AROUND TO USE ENV. VARS ####################### -############################################################################### - -SAVE_CC=$CC -SAVE_FC=$FC -SAVE_CFLAGS=$CFLAGS -SAVE_FFLAGS=$FFLAGS -SAVE_INCLUDES=$INCLUDES -SAVE_LDFLAGS=$LDFLAGS -SAVE_LIBS=$LIBS - ############################################################################### ############### PATH SERACH FUNCTION - to be used later... #################### ############################################################################### @@ -368,40 +358,6 @@ fi LIBS="$LIBS -lz -lm" - -############################################################################### -################# A SIMPLE WORK AROUND TO USE ENV. VARS ####################### -############################################################################### - -#if there was an external input for the variable... -if test -n "$SAVE_CC"; then - CC="$SAVE_CC" -fi - -if test -n "$SAVE_FC"; then - FC="$SAVE_FC" -fi - -if test -n "$SAVE_CFLAGS"; then - CFLAGS="$SAVE_CFLAGS" -fi - -if test -n "$SAVE_FFLAGS"; then - FFLAGS="$SAVE_FFLAGS" -fi - -if test -n "$SAVE_INCLUDES"; then - INCLUDES="$SAVE_INCLUDES" -fi - -if test -n "$SAVE_LDFLAGS"; then - LDFLAGS="$SAVE_LDFLAGS" -fi - -if test -n "$SAVE_LIBS"; then - LIBS="$SAVE_LIBS" -fi - ############################################################################### ############## EXPORTING VARIABLES & CREATING OUTPUT FILES #################### ###############################################################################