Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #211: Added support for modern autoconf/automake #212

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.deps/
/aclocal.m4
/autom4te.cache/
/config.h.in
/config.h
/config.log
/config.status
/configure
/config/test-driver
/stamp-h1
/HTML5-frontend/jquery-1.4.4.min.js
*.stamp
Makefile
Makefile.in
bin/
dist/
1 change: 1 addition & 0 deletions Admin/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ GCJLINK = $(GCJLD)
NDTGCJFLAGS = -d bin -sourcepath src
CLASSPATH_ENV =
TEMPDIRS = bin
AUTOMAKE_OPTIONS = no-exeext

noinst_PROGRAMS = Admin.class

Expand Down
1 change: 1 addition & 0 deletions Applet/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jsonlib = lib/json-simple-1.1.1.jar
NDTGCJFLAGS = -d bin -sourcepath src -cp $(jsonlib)
NDTJARSIGNERFLAG = -keystore
TEMPDIRS = bin dist
AUTOMAKE_OPTIONS = no-exeext

ndtdir = $(prefix)/ndt
jsonlibdir = $(ndtdir)/lib
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Description: toplevel build for bwctl
#

ACLOCAL_AMFLAGS = -I config

SUBDIRS = @TOP_BUILD_DIRS@ src conf doc HTML5-frontend

if INCLUDE_APPLET
Expand Down
30 changes: 0 additions & 30 deletions config/c-attribute.m4

This file was deleted.

18 changes: 11 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# AC_PREREQ(2.57)
AC_INIT([NDT],[4.0.0.1],[ndt-user@internet2.edu])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
# AM_INIT_AUTOMAKE(NDT, v1.0, [no-define])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/analyze.c])
Expand Down Expand Up @@ -222,9 +223,9 @@ OLD_LDFLAGS="$LDFLAGS"
OLD_CFLAGS="$CFLAGS"

CFLAGS="$CFLAGS $I2UTILINCS"
LDFLAGS="$CFLAGS $I2UTILLDFLAGS"
LDFLAGS="$LDFLAGS $I2UTILLDFLAGS"

AC_SEARCH_LIBS([I2AddrByNode],I2util, HAVE_I2UTIL_LIBS=1,HAVE_I2UTIL_LIBS=0)
AC_CHECK_LIB([I2util], [I2AddrByNode], HAVE_I2UTIL_LIBS=1, HAVE_I2UTIL_LIBS=0)
AC_CHECK_HEADERS([I2util/util.h I2util/conf.h], HAVE_I2UTIL_HEADERS=1,HAVE_I2UTIL_HEADERS=0)

LDFLAGS="$OLD_LDFLAGS"
Expand All @@ -233,9 +234,13 @@ CFLAGS="$OLD_CFLAGS"
if test "$HAVE_I2UTIL_HEADERS" != "1" || test "$HAVE_I2UTIL_LIBS" != "1"; then
# now, check for sub-build/sub-configure
if test -d I2util/I2util; then
# clear the cache
AS_UNSET([ac_cv_lib_I2util_I2AddrByNode])
AS_UNSET([ac_cv_header_I2util_util_h])
AS_UNSET([ac_cv_header_I2util_conf_h])
AC_CONFIG_SUBDIRS(I2util)
TOP_BUILD_DIRS="I2util $TOP_BUILD_DIRS"
I2util_dir='${top_srcdir}/I2util'
I2util_dir="`pwd`/I2util"
I2UTILINCS="-I$I2util_dir $I2UTILINCS"
I2UTILLDFLAGS="-L$I2util_dir/I2util $I2UTILLDFLAGS"
I2UTILLIBDEPS="$I2util_dir/I2util/libI2util.a"
Expand All @@ -249,15 +254,13 @@ if test "$HAVE_I2UTIL_HEADERS" != "1" || test "$HAVE_I2UTIL_LIBS" != "1"; then
OLD_CFLAGS="$CFLAGS"

CFLAGS="$CFLAGS $I2UTILINCS"
LDFLAGS="$CFLAGS $I2UTILLDFLAGS"
LDFLAGS="$LDFLAGS $I2UTILLDFLAGS"

AC_SEARCH_LIBS([I2AddrByNode],I2util, ,AC_MSG_ERROR([Couldn't find I2util library]))
AC_CHECK_LIB([I2util], [I2AddrByNode], [:], AC_MSG_ERROR([Couldn't find I2util library]))
AC_CHECK_HEADERS([I2util/util.h I2util/conf.h], ,AC_MSG_ERROR([Couldn't find I2util header files]), [AC_INCLUDES_DEFAULT])

LDFLAGS="$OLD_LDFLAGS"
CFLAGS="$OLD_CFLAGS"

I2UTILLIBS="$I2UTILLDFLAGS -lI2util"
fi

I2UTILLIBS="$I2UTILLDFLAGS -lI2util"
Expand Down Expand Up @@ -422,6 +425,7 @@ AC_C_CONST
AC_HEADER_TIME

# Checks for library functions.
m4_pattern_forbid([^AX_])
AX_CHECK_OPENSSL(AM_CONDITIONAL(HAVE_SSL, true), AM_CONDITIONAL(HAVE_SSL, false))

AC_FUNC_ERROR_AT_LINE
Expand Down
1 change: 1 addition & 0 deletions flash-client/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

NDTMXMLCFLAGS = -o dist/FlashClt.swf -load-config+=ndt-flash-config.xml
TEMPDIRS = dist
AUTOMAKE_OPTIONS = no-exeext

ndtdir = $(prefix)/ndt

Expand Down
5 changes: 3 additions & 2 deletions janalyze/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
GCJLINK = $(GCJLD)
CLASSPATH_ENV =
NDTGCJFLAGS = -cp external:src/edu/internet2/ndt -d bin -sourcepath src
GCJFLAGS =
AM_GCJFLAGS =
TEMPDIRS = bin dist
AUTOMAKE_OPTIONS = no-exeext

ndtdir = $(prefix)/ndt

Expand Down Expand Up @@ -52,7 +53,7 @@ create-packageDirs:
install-JAnalyzeJAVA: classJAnalyze.stamp create-packageDirs
@$(NORMAL_INSTALL)
test -z "$(JAnalyzedir)" || $(mkdir_p) "$(DESTDIR)$(JAnalyzedir)"
@test -z "$(JAnalyze_JAVA/bin/edu/internet2/ndt)" || for p in *.class; do \
@test -z "$(JAnalyze_JAVA)/bin/edu/internet2/ndt" || for p in *.class; do \
echo " $(INSTALL_DATA) '$$p' '$(DESTDIR)$(JAnalyzedir)/edu/internet2/ndt/$$p'"; \
$(INSTALL_DATA) "$$p" "$(DESTDIR)$(JAnalyzedir)/edu/internet2/ndt/$$p"; \
done
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
# Description:

INCLUDES = $(NDTINCDIR) $(I2UTILINCS)
AM_CPPFLAGS = $(NDTINCDIR) $(I2UTILINCS)
AM_LDFLAGS = $(NDTLDFLAGS)
AM_LIBS = $(I2UTILLIBS)
AM_CFLAGS = $(NDTCFLAGS)
Expand Down