Skip to content

Commit a1781a1

Browse files
committed
XX-10704 - Support fedora 19
1 parent 02f7301 commit a1781a1

22 files changed

+777
-370
lines changed

Makefile.in

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ BUILDDIR = $(abspath @builddir@)
55
SRC = $(abspath @srcdir@)
66

77
PACKAGE_VERSION = @PACKAGE_VERSION@
8-
PACKAGE_REVISION = $(shell $(SRC)/config/revision-gen @PACKAGE_VERSION@)
8+
PACKAGE_REVISION = @PACKAGE_REVISION@
99

10-
help-var.DISTRO=To run a command for a different target distro. Default: $(DISTRO). Complete list of available values: @ALL_DISTROS@
1110
DISTRO=@DISTRO@
12-
1311
DISTRO_OS = $(word 1,$(subst -, ,$(DISTRO)))
1412
DISTRO_VER = $(word 2,$(subst -, ,$(DISTRO)))
1513
DISTRO_ARCH = $(word 3,$(subst -, ,$(DISTRO)))
@@ -27,37 +25,33 @@ PROJ = $(filter $(all),$(subst ., ,$@))
2725
proj = $(call lowercase,$(PROJ))
2826
PROJ_REVISION = $(shell cd $(SRC)/$(PROJ) && ./config/revision-gen @PACKAGE_VERSION@)
2927

30-
default-first-target : help;
28+
default-first-target : help-basics;
3129

3230
sipx.% :
3331
$(MAKE) $(foreach P,$(sipx),$(P).$*)
3432

3533
lib.% :
3634
$(MAKE) $(foreach P,$(lib),$(P).$*)
3735

38-
app.% :
39-
$(MAKE) $(foreach P,$(app),$(P).$*)
40-
41-
help.{sipx,lib}.list=list all sipx components
42-
app.list lib.list sipx.list : %.list :
36+
help.sipx.list = List all sipxecs projects considered in this build system. To add or remove, edit .modules-include or .modules-exclude
37+
lib.list sipx.list : %.list :
4338
@echo $($*)
4439

4540
include $(sort $(wildcard mak/*.mk))
4641

47-
help-values.{1} = Any sipXecs package. For all sipXecs packages use 'sipx'. Complete list of sipXecs packages : $(sipx)
48-
help-values.{2} = Any dependency package. For all dependencies use 'lib'. Complete list of dependencies : $(lib)
49-
help-values.{6} = Any sipXecs application. For all app use 'app'. Complete list of app : $(app)
50-
51-
.PHONY: help
52-
help:
53-
@echo -e "\nCOMMON TARGETS\n==================="
54-
@$(MAKE) --no-print-directory -s help.print
55-
@echo -e "\nALLOWED VALUES\n==================="
56-
@$(MAKE) --no-print-directory -s help-values.print
42+
help.help = Show this help screen plus more information on more targets and important make variables.
43+
.PHONY: help help-basics
44+
help : help-basics
45+
@echo -e "\nADDITIONAL TARGETS\n==================="
46+
@$(MAKE) --no-print-directory -s help-more.print
5747
@echo -e "\nSPECIAL VARIABLES\n==================="
5848
@$(MAKE) --no-print-directory -s help-var.print
5949

60-
help-values.print help.print help-var.print: %.print :
50+
help-basics:
51+
@echo -e "\nTARGETS\n==================="
52+
@$(MAKE) --no-print-directory -s help.print
53+
54+
help.print help-more.print help-var.print: %.print :
6155
@$(foreach H,$(filter $*.%,$(sort $(.VARIABLES))), \
6256
echo "$$format_help" | Label="$(H:$*.%=%)" Text="$($(H))" bash;)
6357

config/general.m4

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ AC_DEFUN([CHECK_CPPUNIT],
198198
[
199199
AM_PATH_CPPUNIT(1.9,
200200
[],
201-
[AC_MSG_ERROR("cppunit headers not found")]
201+
[SF_MISSING_DEP("cppunit headers not found")]
202202
)
203203
])
204204

@@ -232,7 +232,7 @@ AC_DEFUN([CHECK_SSL],
232232
fi
233233
done
234234
if test x_$found_ssl_inc != x_yes ; then
235-
AC_MSG_ERROR(['openssl/ssl.h' not found; tried ${tried_path}])
235+
SF_MISSING_DEP(['openssl/ssl.h' not found; tried ${tried_path}])
236236
else
237237
AC_MSG_RESULT($sslincdir)
238238
HAVE_SSL=yes
@@ -273,7 +273,7 @@ AC_DEFUN([CHECK_SSL],
273273
done
274274
275275
if test x_$found_ssl_lib != x_yes ; then
276-
AC_MSG_ERROR(['libssl.so' not found; tried $openssl_path, each with lib, lib/openssl, and lib/ssl])
276+
SF_MISSING_DEP(['libssl.so' not found; tried $openssl_path, each with lib, lib/openssl, and lib/ssl])
277277
else
278278
AC_MSG_RESULT($ssllibdir)
279279
if test x_"`uname -s`" = x_SunOS ; then
@@ -303,7 +303,7 @@ AC_DEFUN([CHECK_SSL],
303303
done
304304
fi
305305
if test x_$krb_found = x_no; then
306-
AC_MSG_RESULT(['kerberos krb5.h' not found - looked in /usr/include $openssl_path])
306+
SF_MISSING_DEP(['kerberos krb5.h' not found - looked in /usr/include $openssl_path])
307307
fi
308308
309309
AC_SUBST(SSL_CFLAGS,"$SSL_CFLAGS")
@@ -313,10 +313,10 @@ AC_DEFUN([CHECK_SSL],
313313
# ============ P O C O =========================
314314
AC_DEFUN([CHECK_POCO],
315315
[
316-
AC_CHECK_LIB(PocoFoundation, main,[], [AC_MSG_ERROR("Poco C++ Library not found")])
317-
AC_CHECK_LIB(PocoXML, main,[], [AC_MSG_ERROR("PocoXML C++ Library not found")])
318-
AC_CHECK_LIB(PocoUtil, main,[], [AC_MSG_ERROR("PocoUtil C++ Library not found")])
319-
AC_CHECK_LIB(PocoNet, main,[], [AC_MSG_ERROR("PocoNet C++ Library not found")])
316+
AC_CHECK_LIB(PocoFoundation, main,[], [SF_MISSING_DEP("Poco C++ Library not found")])
317+
AC_CHECK_LIB(PocoXML, main,[], [SF_MISSING_DEP("PocoXML C++ Library not found")])
318+
AC_CHECK_LIB(PocoUtil, main,[], [SF_MISSING_DEP("PocoUtil C++ Library not found")])
319+
AC_CHECK_LIB(PocoNet, main,[], [SF_MISSING_DEP("PocoNet C++ Library not found")])
320320
AC_SUBST(POCO_LIBS, "-lPocoNet -lPocoUtil -lPocoXML -lPocoFoundation")
321321
])
322322

@@ -408,7 +408,7 @@ AC_DEFUN([CHECK_XERCES],
408408
done
409409
410410
if test x_$found_xerces != x_yes; then
411-
AC_MSG_ERROR([Cannot find xerces - looked for include/xercesc/dom/DOMBuilder.hpp or /include/xercesc/dom/DOMBuilder.hpp in $xerces_path])
411+
SF_MISSING_DEP([Cannot find xerces - looked for include/xercesc/dom/DOMBuilder.hpp or /include/xercesc/dom/DOMBuilder.hpp in $xerces_path])
412412
else
413413
AC_MSG_RESULT($xercesdirm)
414414
AC_SUBST(XERCES_CFLAGS,"$XERCES_CFLAGS")
@@ -451,7 +451,7 @@ AC_DEFUN([CHECK_APACHE2],
451451
AC_MSG_RESULT($apache2_httpd)
452452
AC_SUBST(APACHE2_HTTPD, $apache2_httpd)
453453
else
454-
AC_MSG_ERROR('httpd' not found; tried: $apache2_bin_search_path)
454+
SF_MISSING_DEP('httpd' not found; tried: $apache2_bin_search_path)
455455
fi
456456
457457
## APACHE2_VERSION is the Apache version number.
@@ -474,7 +474,7 @@ AC_DEFUN([CHECK_APACHE2],
474474
*)
475475
apache2_host_access="UNKNOWN"
476476
apache2_mod_access="UNKNOWN"
477-
AC_MSG_ERROR(Unknown apache version $apache2_version)
477+
SF_MISSING_DEP(Unknown apache version $apache2_version)
478478
;;
479479
esac
480480
AC_MSG_RESULT($apache2_host_access = $apache2_mod_access)
@@ -523,7 +523,7 @@ AC_DEFUN([CHECK_APACHE2],
523523
AC_SUBST(APACHE2_MOD, $apache2_mod_override)
524524
AC_MSG_WARN('$apache2_mod_access', 'mod_cgi.so', and 'httpd.exp' not found; using explicit value: $tried_path)
525525
else
526-
AC_MSG_ERROR('$apache2_mod_access' and 'httpd.exp' not found; tried: $tried_path)
526+
SF_MISSING_DEP('$apache2_mod_access' and 'httpd.exp' not found; tried: $tried_path)
527527
fi
528528
529529
apache2_home=`dirname ${apache2_moddir}`
@@ -624,10 +624,10 @@ AC_DEFUN([CHECK_PCRE],
624624
# Test that we've been able to find both directories, and set the various
625625
# makefile variables.
626626
if test x_$found_pcre_include != x_yes; then
627-
AC_MSG_ERROR(Cannot find pcre.h - looked in $includeval)
627+
SF_MISSING_DEP(Cannot find pcre.h - looked in $includeval)
628628
else
629629
if test x_$found_pcre_lib != x_yes; then
630-
AC_MSG_ERROR(Cannot find libpcre.so or libpcre.a libraries - looked in $libval)
630+
SF_MISSING_DEP(Cannot find libpcre.so or libpcre.a libraries - looked in $libval)
631631
else
632632
## Test for version
633633
if test x$homeval != x; then
@@ -637,7 +637,7 @@ AC_DEFUN([CHECK_PCRE],
637637
fi
638638
AX_COMPARE_VERSION([$pcre_ver],[ge],[4.5],
639639
[AC_MSG_RESULT($pcre_ver is ok)],
640-
[AC_MSG_ERROR([pcre version must be >= 4.5 - found $pcre_ver])])
640+
[SF_MISSING_DEP([pcre version must be >= 4.5 - found $pcre_ver])])
641641
642642
AC_MSG_RESULT([ pcre includes found in $includeval])
643643
AC_MSG_RESULT([ pcre libraries found in $libval])
@@ -1170,10 +1170,10 @@ AC_DEFUN([CHECK_ODBC],
11701170
# Test that we've been able to find both directories, and set the various
11711171
# makefile variables.
11721172
if test x_$found_odbc_include != x_yes; then
1173-
AC_MSG_ERROR(Cannot find sql.h - looked in $includeval)
1173+
SF_MISSING_DEP(Cannot find sql.h - looked in $includeval)
11741174
else
11751175
if test x_$found_odbc_lib != x_yes; then
1176-
AC_MSG_ERROR(Cannot find libodbc.so or libodbc.a libraries - looked in $libval)
1176+
SF_MISSING_DEP(Cannot find libodbc.so or libodbc.a libraries - looked in $libval)
11771177
else
11781178
## Test for version
11791179
odbc_ver=`odbcinst --version`

config/revision-gen

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ if test -f ./tarball-revision; then
1313
cat ./tarball-revision
1414
exit
1515
fi
16-
case $1 in
17-
-s )
18-
shift
19-
sdir=$1
20-
shift
21-
abs_path=`readlink -f $0`
22-
parent=`cd $sdir; $abs_path $@`
23-
parent_rev=${parent%.*}
24-
;;
25-
esac
16+
17+
# projects that are submodules should add to their parent's revision otherwise
18+
# if there is a rebuild because a dependency triggered a reinstall then package
19+
# wouldn't be a new revision number and not trigger reinstall on update
20+
if test -d ../.git; then
21+
abs_path=`readlink -f $0`
22+
parent=`cd ..; $abs_path $@`
23+
parent_rev=${parent%.*}
24+
fi
25+
2626
VERSION=$1
2727
VER_REV=`git describe --abbrev=5 --match="v${VERSION}" HEAD`
2828
if [ "$?" != "0" ]; then

config/sipXlib.m4

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
## Libs from SipFoundry
33
##
44

5+
AC_ARG_ENABLE(dep-check,
6+
AS_HELP_STRING([--disable-dep-check],
7+
[Do not check for dependencies other then those required for dist target]))
8+
9+
AC_DEFUN([SF_MISSING_DEP],[
10+
if test "x$enable_dep_check" != "xno"; then
11+
AC_MSG_ERROR([$1])
12+
fi
13+
])
14+
515
## Common C and C++ flags for pingtel related source
616
AC_DEFUN([SFAC_INIT_FLAGS],
717
[

config/sipXlib2.m4

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,18 @@ test -n "$SIPXPBXUSER" || SIPXPBXUSER=$USER
4242
AC_ARG_VAR(SIPXPBXGROUP, [The sipX service daemon group name, default is value of SIPXPBXUSER])
4343
test -n "$SIPXPBXGROUP" || SIPXPBXGROUP=$SIPXPBXUSER
4444

45-
AC_ARG_VAR(PACKAGE_REVISION, [Package revision number, default is pulled from git])
46-
if test -z "$PACKAGE_REVISION" ; then
47-
# Submodules need to add the number of commits of parent plus the number of commits
48-
# to their repository. Otherwise a rebuild may not increase revision and fresh rpm
49-
# silently not installed.
50-
if test -d "${srcdir}/.git" ; then
51-
SUBMOD_OPT="-s .."
52-
fi
53-
PACKAGE_REVISION=`cd ${srcdir} && ./config/revision-gen ${SUBMOD_OPT} ${PACKAGE_VERSION}`
45+
AC_ARG_VAR(PACKAGE_REVISION, [Package revision number. Default is based on date rpm is built. Allowed values: stable, unstable, developer or supply your own value of command.])
46+
if test -z "$PACKAGE_REVISION" || test "$PACKAGE_REVISION" == "developer" ; then
47+
PACKAGE_REVISION=`date +%Y%m%d%H%M%S`
48+
else
49+
case ${PACKAGE_REVISION} in
50+
unstable )
51+
PACKAGE_REVISION=0`date +%Y%m%d%H%M%S`
52+
;;
53+
stable )
54+
PACKAGE_REVISION=`cd ${srcdir} && ./config/revision-gen ${PACKAGE_VERSION}`
55+
;;
56+
esac
5457
fi
5558
AC_DEFINE_UNQUOTED([PACKAGE_REVISION], "${PACKAGE_REVISION}", [Revion number including git SHA])
5659

@@ -61,12 +64,3 @@ AC_SUBST(IFDEF, [ifdef])
6164
AC_SUBST(IFNDEF, [ifndef])
6265
AC_SUBST(ENDIF, [endif])
6366

64-
AC_ARG_ENABLE(dep-check,
65-
AS_HELP_STRING([--disable-dep-check],
66-
[Do not check for dependencies other then those required for dist target]))
67-
68-
AC_DEFUN([SF_MISSING_DEP],[
69-
if test "x$enable_dep_check" != "xno"; then
70-
AC_MSG_ERROR([$1])
71-
fi
72-
])

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ for a in $@; do
1515
--prefix*)OPTIONS+=" $a" ;;
1616
--disable-dep-check*)OPTIONS+=" $a" ;;
1717
--enable-debug*)OPTIONS+=" $a" ;;
18-
PACKAGE_REVISION*)OPTIONS+=" $a" ;;
18+
PACKAGE_REVISION*)OPTIONS+=" $a" ;;
1919
esac
2020
done
2121
AC_SUBST(OPTIONS)
@@ -30,6 +30,7 @@ m4_sinclude([custom/custom.m4])
3030
AC_CONFIG_FILES([Makefile])
3131
AC_CONFIG_FILES([mak/05-build.mk:mak/build.mk.in])
3232
AC_CONFIG_FILES([mak/20-list-dependencies.mk:mak/list-dependencies.mk.in])
33+
AC_CONFIG_FILES([mak/30-setup.mk:mak/setup.mk.in])
3334

3435
AC_OUTPUT
3536

0 commit comments

Comments
 (0)