Skip to content

Commit fecc95d

Browse files
committed
build: Update autotools files
Update configure.ac. Update and add m4 files under confi.g Update automake files, Makefile.am.
1 parent dac1997 commit fecc95d

17 files changed

+911
-973
lines changed

Makefile.am

+13-8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
##--------------------------------------------------------------------------------
2929
##
3030
## Update Log:
31+
## Apr 28 2016 DHA: Modernized build system
3132
## Jan 11 2013 DHA: Added launchmon.spec and launchmon.module for
3233
## RPM support. Added INSTALL.launchmon, as 'make dist'
3334
## was not distributing that file.
@@ -40,12 +41,16 @@
4041
## Mar 27 2006 DHA: Created file.
4142
##
4243

43-
SUBDIRS = tools launchmon test
44-
EXTRA_DIST = config/ap \
45-
README.ERROR_HANDLING \
46-
package.conf \
47-
launchmon.spec \
48-
launchmon.module \
49-
bootstrap \
50-
INSTALL.launchmon
44+
SUBDIRS = \
45+
tools \
46+
launchmon \
47+
etc \
48+
test
49+
50+
EXTRA_DIST = \
51+
config/ap \
52+
README.ERROR_HANDLING \
53+
README.md
54+
5155
ACLOCAL_AMFLAGS = -I config
56+

config.h.in

+80-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,83 @@
2424
/* env command found */
2525
#undef ENVCMD
2626

27-
/* 1 if defined */
28-
#undef GCRYPT
27+
/* Algorithm AES in gcrypt library */
28+
#undef GCRYPT_WITH_AES
29+
30+
/* Algorithm ARCFOUR in gcrypt library */
31+
#undef GCRYPT_WITH_ARCFOUR
32+
33+
/* Algorithm BLOWFISH in gcrypt library */
34+
#undef GCRYPT_WITH_BLOWFISH
35+
36+
/* Algorithm CAST5 in gcrypt library */
37+
#undef GCRYPT_WITH_CAST5
38+
39+
/* Algorithm CRC in gcrypt library */
40+
#undef GCRYPT_WITH_CRC
41+
42+
/* Algorithm DES in gcrypt library */
43+
#undef GCRYPT_WITH_DES
44+
45+
/* Algorithm DSA in gcrypt library */
46+
#undef GCRYPT_WITH_DSA
47+
48+
/* Algorithm ELGAMAL in gcrypt library */
49+
#undef GCRYPT_WITH_ELGAMAL
50+
51+
/* Algorithm HAVAL in gcrypt library */
52+
#undef GCRYPT_WITH_HAVAL
53+
54+
/* Algorithm IDEA in gcrypt library */
55+
#undef GCRYPT_WITH_IDEA
56+
57+
/* Algorithm MD2 in gcrypt library */
58+
#undef GCRYPT_WITH_MD2
59+
60+
/* Algorithm MD4 in gcrypt library */
61+
#undef GCRYPT_WITH_MD4
62+
63+
/* Algorithm MD5 in gcrypt library */
64+
#undef GCRYPT_WITH_MD5
65+
66+
/* Algorithm RFC2268 in gcrypt library */
67+
#undef GCRYPT_WITH_RFC2268
68+
69+
/* Algorithm RMD160 in gcrypt library */
70+
#undef GCRYPT_WITH_RMD160
71+
72+
/* Algorithm RSA in gcrypt library */
73+
#undef GCRYPT_WITH_RSA
74+
75+
/* Algorithm SERPENT in gcrypt library */
76+
#undef GCRYPT_WITH_SERPENT
77+
78+
/* Algorithm SHA0 in gcrypt library */
79+
#undef GCRYPT_WITH_SHA0
80+
81+
/* Algorithm SHA1 in gcrypt library */
82+
#undef GCRYPT_WITH_SHA1
83+
84+
/* Algorithm SHA224 in gcrypt library */
85+
#undef GCRYPT_WITH_SHA224
86+
87+
/* Algorithm SHA256 in gcrypt library */
88+
#undef GCRYPT_WITH_SHA256
89+
90+
/* Algorithm SHA384 in gcrypt library */
91+
#undef GCRYPT_WITH_SHA384
92+
93+
/* Algorithm SHA512 in gcrypt library */
94+
#undef GCRYPT_WITH_SHA512
95+
96+
/* Algorithm TIGER in gcrypt library */
97+
#undef GCRYPT_WITH_TIGER
98+
99+
/* Algorithm TWOFISH in gcrypt library */
100+
#undef GCRYPT_WITH_TWOFISH
101+
102+
/* Algorithm WHIRLPOOL in gcrypt library */
103+
#undef GCRYPT_WITH_WHIRLPOOL
29104

30105
/* Define to 1 if you have the <algorithm> header file. */
31106
#undef HAVE_ALGORITHM
@@ -45,6 +120,9 @@
45120
/* Define to 1 if you have the <fstream> header file. */
46121
#undef HAVE_FSTREAM
47122

123+
/* Gcrypt library is available */
124+
#undef HAVE_GCRYPT
125+
48126
/* Define to 1 if you have the `gettimeofday' function. */
49127
#undef HAVE_GETTIMEOFDAY
50128

config/ax_lib_gcrypt.m4

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# ===========================================================================
2+
# http://www.gnu.org/software/autoconf-archive/ax_lib_gcrypt.html
3+
# ===========================================================================
4+
#
5+
# SYNOPSIS
6+
#
7+
# AX_LIB_GCRYPT([yes|no|auto])
8+
#
9+
# DESCRIPTION
10+
#
11+
# Searches for the 'gcrypt' library with the --with... option.
12+
#
13+
# If found, define HAVE_GCRYPT and macro GCRYPT_LIBS and GCRYPT_CFLAGS.
14+
# Also defines GCRYPT_WITH_<algo> for the algorithms found available.
15+
# Possible algorithms are: AES ARCFOUR BLOWFISH CAST5 DES IDEA RFC2268
16+
# SERPENT TWOFISH CRC HAVAL MD2 MD4 MD5 RMD160 SHA0 SHA1 SHA224 SHA256
17+
# SHA384 SHA512 TIGER WHIRLPOOL DSA ELGAMAL RSA
18+
#
19+
# The argument is used if no --with...-gcrypt option is set. Value "yes"
20+
# requires the configuration by default. Value "no" does not require it by
21+
# default. Value "auto" configures the library only if available.
22+
#
23+
# See also AX_LIB_BEECRYPT and AX_LIB_CRYPTO.
24+
#
25+
# LICENSE
26+
#
27+
# Copyright (c) 2009 Fabien Coelho <[email protected]>
28+
#
29+
# Copying and distribution of this file, with or without modification, are
30+
# permitted in any medium without royalty provided the copyright notice
31+
# and this notice are preserved. This file is offered as-is, without any
32+
# warranty.
33+
34+
#serial 9
35+
36+
# AX_CHECK_GCRYPT_ALGO([algo])
37+
# generate convenient defines for each algorithm
38+
AC_DEFUN([AX_CHECK_GCRYPT_ALGO],[
39+
AC_REQUIRE([AC_PROG_EGREP])
40+
AC_MSG_CHECKING([for $1 in gcrypt])
41+
if echo $gcrypt_algos | $EGREP -i ":.*( $1 | $1$)" > /dev/null ; then
42+
AC_DEFINE([GCRYPT_WITH_$1],[1],[Algorithm $1 in gcrypt library])
43+
AC_MSG_RESULT([yes])
44+
else
45+
AC_MSG_RESULT([no])
46+
fi
47+
])
48+
49+
# AX_LIB_GCRYPT([yes|no|auto])
50+
AC_DEFUN([AX_LIB_GCRYPT],[
51+
AC_MSG_CHECKING([whether gcrypt is enabled])
52+
AC_ARG_WITH([gcrypt],[ --with-gcrypt require gcrypt library
53+
--without-gcrypt disable gcrypt library],[
54+
AC_MSG_RESULT([$withval])
55+
ac_with_gcrypt=$withval
56+
],[
57+
AC_MSG_RESULT($1)
58+
ac_with_gcrypt=$1
59+
])
60+
if test "$ac_with_gcrypt" = "yes" -o "$ac_with_gcrypt" = "auto" ; then
61+
AM_PATH_LIBGCRYPT([1.2.0],[
62+
AC_DEFINE([HAVE_GCRYPT],[1],[Gcrypt library is available])
63+
HAVE_GCRYPT=1
64+
# checking for available algorithms...
65+
gcrypt_algos=`$LIBGCRYPT_CONFIG --algorithms`
66+
# ciphers
67+
# this does not work with a "for" loop: nothing generated in config.h:-(
68+
AX_CHECK_GCRYPT_ALGO([AES])
69+
AX_CHECK_GCRYPT_ALGO([ARCFOUR])
70+
AX_CHECK_GCRYPT_ALGO([BLOWFISH])
71+
AX_CHECK_GCRYPT_ALGO([CAST5])
72+
AX_CHECK_GCRYPT_ALGO([DES])
73+
AX_CHECK_GCRYPT_ALGO([IDEA])
74+
AX_CHECK_GCRYPT_ALGO([RFC2268])
75+
AX_CHECK_GCRYPT_ALGO([SERPENT])
76+
AX_CHECK_GCRYPT_ALGO([TWOFISH])
77+
# digests
78+
AX_CHECK_GCRYPT_ALGO([CRC])
79+
AX_CHECK_GCRYPT_ALGO([HAVAL])
80+
AX_CHECK_GCRYPT_ALGO([MD2])
81+
AX_CHECK_GCRYPT_ALGO([MD4])
82+
AX_CHECK_GCRYPT_ALGO([MD5])
83+
AX_CHECK_GCRYPT_ALGO([RMD160])
84+
AX_CHECK_GCRYPT_ALGO([SHA0])
85+
AX_CHECK_GCRYPT_ALGO([SHA1])
86+
AX_CHECK_GCRYPT_ALGO([SHA224])
87+
AX_CHECK_GCRYPT_ALGO([SHA256])
88+
AX_CHECK_GCRYPT_ALGO([SHA384])
89+
AX_CHECK_GCRYPT_ALGO([SHA512])
90+
AX_CHECK_GCRYPT_ALGO([TIGER])
91+
AX_CHECK_GCRYPT_ALGO([WHIRLPOOL])
92+
# others
93+
AX_CHECK_GCRYPT_ALGO([DSA])
94+
AX_CHECK_GCRYPT_ALGO([ELGAMAL])
95+
AX_CHECK_GCRYPT_ALGO([RSA])
96+
# conclusion
97+
GCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
98+
GCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
99+
AC_SUBST(GCRYPT_CFLAGS)
100+
AC_SUBST(GCRYPT_LIBS)
101+
],[
102+
# complain only if explicitely required
103+
if test "$ac_with_gcrypt" = "yes" ; then
104+
AC_MSG_ERROR([cannot configure required gcrypt library])
105+
fi
106+
])
107+
fi
108+
])

config/x_ac_bootfabric.m4

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ AC_DEFUN([X_AC_BOOTFABRIC], [
7373
AC_DEFINE(MPI_BASED, 1, [Define 1 for MPI_BASED])
7474
AC_MSG_ERROR([MPI as a underlying comm. fabric no longer supported])
7575
elif test "x$with_fab" = "xcobo" -o "x$with_fab" = "xyes"; then
76-
if test -d tools/cobo; then
76+
if test -d $srcdir/tools/cobo; then
7777
#
7878
# Following defines macroes to pick up the customization
7979
# added to the original COBO implementation.
@@ -86,7 +86,7 @@ AC_DEFUN([X_AC_BOOTFABRIC], [
8686
AC_DEFINE(TOOL_PORT_ENV, "LMON_FE_WHERETOCONNECT_PORT", [Define TOOL_PORT_ENV] )
8787
AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV])
8888
AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV])
89-
AC_SUBST(COMMLOC, tools/cobo/src)
89+
AC_SUBST(COMMLOC, $builddir/tools/cobo/src)
9090
AC_SUBST(LIBCOMM, libcobo.la)
9191
9292
if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then
@@ -103,7 +103,7 @@ AC_DEFUN([X_AC_BOOTFABRIC], [
103103
#
104104
# Making COBO default
105105
#
106-
if test -d tools/cobo; then
106+
if test -d $srcdir/tools/cobo; then
107107
#
108108
# Following defines macroes to pick up the customization
109109
# added to the original COBO implementation.
@@ -116,7 +116,7 @@ AC_DEFUN([X_AC_BOOTFABRIC], [
116116
AC_DEFINE(TOOL_PORT_ENV, "LMON_FE_WHERETOCONNECT_PORT", [Define TOOL_PORT_ENV] )
117117
AC_DEFINE(TOOL_SS_ENV, "LMON_SHARED_SECRET", [Define TOOL_SS_ENV])
118118
AC_DEFINE(TOOL_SCH_ENV, "LMON_SEC_CHK", [Define TOOL_SCH_ENV])
119-
AC_SUBST(COMMLOC, tools/cobo/src)
119+
AC_SUBST(COMMLOC, $builddir/tools/cobo/src)
120120
AC_SUBST(LIBCOMM, libcobo.la)
121121
122122
if test "x$with_cobo_port" != "xcheck" -a "x$with_cobo_port" != "xyes"; then

config/x_ac_platform.m4

+4-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ AC_DEFUN([X_AC_PLATFORM], [
4040
*linux*) AC_DEFINE(LINUX_CODE_REQUIRED,1,[Define 1 for LINUX_CODE_REQUIRED])
4141
ac_have_known_os="yes"
4242
ac_target_os="linux"
43-
LMONENABSLOC=`config/ap launchmon/src/linux`
43+
#LMONENABSLOC=`config/ap $top_srcdir/launchmon/src/linux`
44+
LMONENABSLOC=`$srcdir/config/ap $srcdir/launchmon/src/linux`
4445
AC_SUBST(LMONENABSLOC)
45-
AC_SUBST(LMONENLOC,[launchmon/src/linux])
46-
AC_SUBST(LMONAPILOC,[launchmon/src/linux/lmon_api])
46+
AC_SUBST(LMONENLOC,[$srcdir/launchmon/src/linux])
47+
AC_SUBST(LMONAPILOC,[$srcdir/launchmon/src/linux/lmon_api])
4748
;;
4849
*aix*) AC_DEFINE(AIX_CODE_REQUIRED,1,[Define 1 for AIX_CODE_REQUIRED])
4950
ac_have_known_os="yes"

0 commit comments

Comments
 (0)