From 55bec054b3917cc65f78788abe046318acb0f0cf Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: May 25 2007 22:55:55 +0000 Subject: Resolves: bug 235293 Bug Description: Review Request: adminutil - Utility library for Fedora Directory Server administration Fix Description: 1) Use macros consistently in the spec file 2) Use install -p to ensure header file timestamps are preserved 3) Fixed acclanglist.c to use LGPL 4) Link admsslutil against adminutil to resolve undefined symbols 5) Check for genrb in icu.m4 --- diff --git a/Makefile.am b/Makefile.am index 062e8a3..f791f26 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,7 +17,9 @@ AM_CPPFLAGS = $(PLATFORM_DEFINES) $(DEBUG_DEFINES) $(ADMINUTIL_DEFINES) $(ADMINU NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 NSS_LINK = @nss_lib@ -lssl3 -lnss3 -lsoftokn3 LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lldap60 -lprldap60 -lldif60 +if enable_tests SASL_LINK = @sasl_lib@ -lsasl2 +endif ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata #------------------------ @@ -26,6 +28,7 @@ ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata lib_LTLIBRARIES = libadminutil.la libadmsslutil.la pkgdata_DATA = root.res en.res en_US.res +if enable_tests check_PROGRAMS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite @@ -51,6 +54,7 @@ psetreadssl_LDADD = $(TEST_LDADD) psetwrite_SOURCES = tests/psetwrite.c psetwrite_CPPFLAGS = $(TEST_CPPFLAGS) psetwrite_LDADD = $(TEST_LDADD) +endif #------------------------ # Installed Files @@ -123,5 +127,5 @@ libadmsslutil_la_SOURCES = lib/libadmsslutil/admsslutil.c \ lib/libadmsslutil/uginfossl.c libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nspr_inc@ @ldapsdk_inc@ @icu_inc@ -libadmsslutil_la_LIBADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) +libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION)) diff --git a/Makefile.in b/Makefile.in index aff3556..551bfb6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,8 +37,9 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = retrieveSIE$(EXEEXT) retrieveSIEssl$(EXEEXT) \ - psetread$(EXEEXT) psetreadssl$(EXEEXT) psetwrite$(EXEEXT) +@enable_tests_TRUE@check_PROGRAMS = retrieveSIE$(EXEEXT) \ +@enable_tests_TRUE@ retrieveSIEssl$(EXEEXT) psetread$(EXEEXT) \ +@enable_tests_TRUE@ psetreadssl$(EXEEXT) psetwrite$(EXEEXT) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/adminutil.pc.in \ $(top_srcdir)/configure \ @@ -84,7 +85,7 @@ am_libadminutil_la_OBJECTS = \ lib/libadminutil/libadminutil_la-strlist.lo \ lib/libadminutil/libadminutil_la-uginfo.lo libadminutil_la_OBJECTS = $(am_libadminutil_la_OBJECTS) -libadmsslutil_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ +libadmsslutil_la_DEPENDENCIES = libadminutil.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am_libadmsslutil_la_OBJECTS = \ @@ -96,26 +97,35 @@ am_libadmsslutil_la_OBJECTS = \ lib/libadmsslutil/libadmsslutil_la-sslerror.lo \ lib/libadmsslutil/libadmsslutil_la-uginfossl.lo libadmsslutil_la_OBJECTS = $(am_libadmsslutil_la_OBJECTS) -am_psetread_OBJECTS = tests/psetread-psetread.$(OBJEXT) +am__psetread_SOURCES_DIST = tests/psetread.c +@enable_tests_TRUE@am_psetread_OBJECTS = \ +@enable_tests_TRUE@ tests/psetread-psetread.$(OBJEXT) psetread_OBJECTS = $(am_psetread_OBJECTS) -am__DEPENDENCIES_2 = libadmsslutil.la libadminutil.la \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) -psetread_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_psetreadssl_OBJECTS = tests/psetreadssl-psetreadssl.$(OBJEXT) +@enable_tests_TRUE@am__DEPENDENCIES_2 = libadmsslutil.la \ +@enable_tests_TRUE@ libadminutil.la $(am__DEPENDENCIES_1) \ +@enable_tests_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ +@enable_tests_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +@enable_tests_TRUE@psetread_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__psetreadssl_SOURCES_DIST = tests/psetreadssl.c +@enable_tests_TRUE@am_psetreadssl_OBJECTS = \ +@enable_tests_TRUE@ tests/psetreadssl-psetreadssl.$(OBJEXT) psetreadssl_OBJECTS = $(am_psetreadssl_OBJECTS) -psetreadssl_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_psetwrite_OBJECTS = tests/psetwrite-psetwrite.$(OBJEXT) +@enable_tests_TRUE@psetreadssl_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__psetwrite_SOURCES_DIST = tests/psetwrite.c +@enable_tests_TRUE@am_psetwrite_OBJECTS = \ +@enable_tests_TRUE@ tests/psetwrite-psetwrite.$(OBJEXT) psetwrite_OBJECTS = $(am_psetwrite_OBJECTS) -psetwrite_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_retrieveSIE_OBJECTS = tests/retrieveSIE-retrieveSIE.$(OBJEXT) +@enable_tests_TRUE@psetwrite_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__retrieveSIE_SOURCES_DIST = tests/retrieveSIE.c +@enable_tests_TRUE@am_retrieveSIE_OBJECTS = \ +@enable_tests_TRUE@ tests/retrieveSIE-retrieveSIE.$(OBJEXT) retrieveSIE_OBJECTS = $(am_retrieveSIE_OBJECTS) -retrieveSIE_DEPENDENCIES = $(am__DEPENDENCIES_2) -am_retrieveSIEssl_OBJECTS = \ - tests/retrieveSIEssl-retrieveSIEssl.$(OBJEXT) +@enable_tests_TRUE@retrieveSIE_DEPENDENCIES = $(am__DEPENDENCIES_2) +am__retrieveSIEssl_SOURCES_DIST = tests/retrieveSIEssl.c +@enable_tests_TRUE@am_retrieveSIEssl_OBJECTS = tests/retrieveSIEssl-retrieveSIEssl.$(OBJEXT) retrieveSIEssl_OBJECTS = $(am_retrieveSIEssl_OBJECTS) -retrieveSIEssl_DEPENDENCIES = $(am__DEPENDENCIES_2) +@enable_tests_TRUE@retrieveSIEssl_DEPENDENCIES = \ +@enable_tests_TRUE@ $(am__DEPENDENCIES_2) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -132,9 +142,9 @@ SOURCES = $(libadminutil_la_SOURCES) $(libadmsslutil_la_SOURCES) \ $(psetwrite_SOURCES) $(retrieveSIE_SOURCES) \ $(retrieveSIEssl_SOURCES) DIST_SOURCES = $(libadminutil_la_SOURCES) $(libadmsslutil_la_SOURCES) \ - $(psetread_SOURCES) $(psetreadssl_SOURCES) \ - $(psetwrite_SOURCES) $(retrieveSIE_SOURCES) \ - $(retrieveSIEssl_SOURCES) + $(am__psetread_SOURCES_DIST) $(am__psetreadssl_SOURCES_DIST) \ + $(am__psetwrite_SOURCES_DIST) $(am__retrieveSIE_SOURCES_DIST) \ + $(am__retrieveSIEssl_SOURCES_DIST) adminincDATA_INSTALL = $(INSTALL_DATA) admsslincDATA_INSTALL = $(INSTALL_DATA) pkgconfigDATA_INSTALL = $(INSTALL_DATA) @@ -238,6 +248,8 @@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ debug_defs = @debug_defs@ +enable_tests_FALSE = @enable_tests_FALSE@ +enable_tests_TRUE = @enable_tests_TRUE@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ @@ -295,7 +307,7 @@ AM_CPPFLAGS = $(PLATFORM_DEFINES) $(DEBUG_DEFINES) $(ADMINUTIL_DEFINES) $(ADMINU NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4 NSS_LINK = @nss_lib@ -lssl3 -lnss3 -lsoftokn3 LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lldap60 -lprldap60 -lldif60 -SASL_LINK = @sasl_lib@ -lsasl2 +@enable_tests_TRUE@SASL_LINK = @sasl_lib@ -lsasl2 ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata #------------------------ @@ -303,24 +315,24 @@ ICU_LINK = @icu_lib@ -licui18n -licuuc -licudata #------------------------ lib_LTLIBRARIES = libadminutil.la libadmsslutil.la pkgdata_DATA = root.res en.res en_US.res -TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite -TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nspr_inc@ @ldapsdk_inc@ @icu_inc@ -TEST_LDADD = libadmsslutil.la libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) -retrieveSIE_SOURCES = tests/retrieveSIE.c -retrieveSIE_CPPFLAGS = $(TEST_CPPFLAGS) -retrieveSIE_LDADD = $(TEST_LDADD) -retrieveSIEssl_SOURCES = tests/retrieveSIEssl.c -retrieveSIEssl_CPPFLAGS = $(TEST_CPPFLAGS) -retrieveSIEssl_LDADD = $(TEST_LDADD) -psetread_SOURCES = tests/psetread.c -psetread_CPPFLAGS = $(TEST_CPPFLAGS) -psetread_LDADD = $(TEST_LDADD) -psetreadssl_SOURCES = tests/psetreadssl.c -psetreadssl_CPPFLAGS = $(TEST_CPPFLAGS) -psetreadssl_LDADD = $(TEST_LDADD) -psetwrite_SOURCES = tests/psetwrite.c -psetwrite_CPPFLAGS = $(TEST_CPPFLAGS) -psetwrite_LDADD = $(TEST_LDADD) +@enable_tests_TRUE@TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite +@enable_tests_TRUE@TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nspr_inc@ @ldapsdk_inc@ @icu_inc@ +@enable_tests_TRUE@TEST_LDADD = libadmsslutil.la libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) +@enable_tests_TRUE@retrieveSIE_SOURCES = tests/retrieveSIE.c +@enable_tests_TRUE@retrieveSIE_CPPFLAGS = $(TEST_CPPFLAGS) +@enable_tests_TRUE@retrieveSIE_LDADD = $(TEST_LDADD) +@enable_tests_TRUE@retrieveSIEssl_SOURCES = tests/retrieveSIEssl.c +@enable_tests_TRUE@retrieveSIEssl_CPPFLAGS = $(TEST_CPPFLAGS) +@enable_tests_TRUE@retrieveSIEssl_LDADD = $(TEST_LDADD) +@enable_tests_TRUE@psetread_SOURCES = tests/psetread.c +@enable_tests_TRUE@psetread_CPPFLAGS = $(TEST_CPPFLAGS) +@enable_tests_TRUE@psetread_LDADD = $(TEST_LDADD) +@enable_tests_TRUE@psetreadssl_SOURCES = tests/psetreadssl.c +@enable_tests_TRUE@psetreadssl_CPPFLAGS = $(TEST_CPPFLAGS) +@enable_tests_TRUE@psetreadssl_LDADD = $(TEST_LDADD) +@enable_tests_TRUE@psetwrite_SOURCES = tests/psetwrite.c +@enable_tests_TRUE@psetwrite_CPPFLAGS = $(TEST_CPPFLAGS) +@enable_tests_TRUE@psetwrite_LDADD = $(TEST_LDADD) #------------------------ # Installed Files @@ -380,7 +392,7 @@ libadmsslutil_la_SOURCES = lib/libadmsslutil/admsslutil.c \ lib/libadmsslutil/uginfossl.c libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nspr_inc@ @ldapsdk_inc@ @icu_inc@ -libadmsslutil_la_LIBADD = $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) +libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION)) all: all-am diff --git a/adminutil.spec b/adminutil.spec index 1129887..ed82e1f 100644 --- a/adminutil.spec +++ b/adminutil.spec @@ -7,7 +7,7 @@ Summary: Utility library for directory server administration Name: adminutil Version: 1.1.1 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPL URL: http://directory.fedoraproject.org/wiki/AdminUtil Group: Development/Libraries @@ -35,16 +35,15 @@ directory server management, containing GET/POST processing code as well as resource handling (ICU ures API). %package devel -Summary: Development and header files for %{name} -Group: Development/Libraries +Summary: Development and header files for %{name} +Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: pkgconfig -BuildRequires: nspr-devel >= %{nspr_version} -BuildRequires: nss-devel >= %{nss_version} -BuildRequires: svrcore-devel >= %{svrcore_version} -BuildRequires: mozldap-devel >= %{mozldap_version} -BuildRequires: libicu-devel >= %{icu_version} -BuildRequires: icu >= %{icu_version} +Requires: pkgconfig +Requires: nspr-devel >= %{nspr_version} +Requires: nss-devel >= %{nss_version} +Requires: svrcore-devel >= %{svrcore_version} +Requires: mozldap-devel >= %{mozldap_version} +Requires: libicu-devel >= %{icu_version} %description devel Development files and header files necessary to build applications @@ -55,15 +54,15 @@ that use %{name}. %build -%configure -make +%configure --disable-tests +%{__make} %{?_smp_mflags} %install %{__rm} -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT -rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a -rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la +%{__make} install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/lib*.a +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/lib*.la %clean %{__rm} -rf $RPM_BUILD_ROOT @@ -85,6 +84,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la %{_includedir}/libadmsslutil %changelog +* Wed May 23 2007 Rich Megginson - 1.1.1-3 +- more fedora review stuff - use macros consistently +- make sure install preserves timestamps +- use lgpl instead of gpl for acclanglist.c +- fix undefined weak symbols in libadmsslutil + * Fri May 18 2007 Rich Megginson - 1.1.1-2 - pkgconfig is a requires not a build requires diff --git a/configure b/configure index 8f2fad5..d2e9d7c 100755 --- a/configure +++ b/configure @@ -465,7 +465,7 @@ ac_includes_default="\ #endif" ac_default_prefix=/opt/$PACKAGE_NAME -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS platform_defs debug_defs PKG_CONFIG ICU_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir sasl_inc sasl_lib icu_inc icu_lib icu_libdir icu_bin WINNT_TRUE WINNT_FALSE LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS platform_defs debug_defs enable_tests_TRUE enable_tests_FALSE PKG_CONFIG ICU_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir sasl_inc sasl_lib icu_inc icu_lib icu_libdir icu_bin WINNT_TRUE WINNT_FALSE LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1038,7 +1038,8 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-debug Enable debug features + --enable-debug Enable debug features + --enable-tests Enable tests to be built (default: yes) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4285,7 +4286,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4288 "configure"' > conftest.$ac_ext + echo '#line 4289 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5420,7 +5421,7 @@ fi # Provide some information about the compiler. -echo "$as_me:5423:" \ +echo "$as_me:5424:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6483,11 +6484,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6486: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6487: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6490: \$? = $ac_status" >&5 + echo "$as_me:6491: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6751,11 +6752,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6754: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6755: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6758: \$? = $ac_status" >&5 + echo "$as_me:6759: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -6855,11 +6856,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6858: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6859: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6862: \$? = $ac_status" >&5 + echo "$as_me:6863: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8324,7 +8325,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8327 "configure"' > conftest.$ac_ext + echo '#line 8328 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9221,7 +9222,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11668: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11671: \$? = $ac_status" >&5 + echo "$as_me:11672: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -11768,11 +11769,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11771: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11772: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11775: \$? = $ac_status" >&5 + echo "$as_me:11776: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12304,7 +12305,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12307 "configure"' > conftest.$ac_ext + echo '#line 12308 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13362,11 +13363,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13365: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13366: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13369: \$? = $ac_status" >&5 + echo "$as_me:13370: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -13466,11 +13467,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13469: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13470: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13473: \$? = $ac_status" >&5 + echo "$as_me:13474: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14915,7 +14916,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 14918 "configure"' > conftest.$ac_ext + echo '#line 14919 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15693,11 +15694,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15696: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15697: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15700: \$? = $ac_status" >&5 + echo "$as_me:15701: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15961,11 +15962,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15964: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15965: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15968: \$? = $ac_status" >&5 + echo "$as_me:15969: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16065,11 +16066,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16068: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16069: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16072: \$? = $ac_status" >&5 + echo "$as_me:16073: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17534,7 +17535,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17537 "configure"' > conftest.$ac_ext + echo '#line 17538 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -22888,6 +22889,34 @@ echo "${ECHO_T}no" >&6 fi; +if test -z "$enable_tests" ; then + enable_tests=yes # default is on - --disable-tests to disable +fi +echo "$as_me:$LINENO: checking for --enable-tests" >&5 +echo $ECHO_N "checking for --enable-tests... $ECHO_C" >&6 +# Check whether --enable-tests or --disable-tests was given. +if test "${enable_tests+set}" = set; then + enableval="$enable_tests" + +fi; +if test "$enable_tests" = "yes" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +if test "$enable_tests" = "yes"; then + enable_tests_TRUE= + enable_tests_FALSE='#' +else + enable_tests_TRUE='#' + enable_tests_FALSE= +fi + + # BEGIN COPYRIGHT BLOCK @@ -23465,6 +23494,7 @@ echo "$as_me: error: The LDAPSDK version in $ldapsdk_inc/ldap-standard.h is not { (exit 1); exit 1; }; } fi +if test "$enable_tests" = "yes" ; then # -*- tab-width: 4; -*- # Configure paths for SASL # Public domain - Nathan Kinder 2006-06-26 @@ -23590,6 +23620,7 @@ echo "$as_me: error: sasl not found, specify with --with-sasl." >&2;} fi fi +fi # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. @@ -23776,6 +23807,12 @@ echo "$as_me: error: ICU not found, specify with --with-icu." >&2;} fi fi +if test ! -f "$icu_bin/genrb" ; then + { { echo "$as_me:$LINENO: error: genrb not found in $icu_bin - please specify ICU bin directory" >&5 +echo "$as_me: error: genrb not found in $icu_bin - please specify ICU bin directory" >&2;} + { (exit 1); exit 1; }; } +fi + # BEGIN COPYRIGHT BLOCK # Copyright (C) 2006 Red Hat, Inc. # All rights reserved. @@ -24020,6 +24057,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${enable_tests_TRUE}" && test -z "${enable_tests_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"enable_tests\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"enable_tests\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"WINNT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -24626,6 +24670,8 @@ s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@platform_defs@,$platform_defs,;t t s,@debug_defs@,$debug_defs,;t t +s,@enable_tests_TRUE@,$enable_tests_TRUE,;t t +s,@enable_tests_FALSE@,$enable_tests_FALSE,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@ICU_CONFIG@,$ICU_CONFIG,;t t s,@nspr_inc@,$nspr_inc,;t t diff --git a/configure.ac b/configure.ac index 76fa366..1bcadae 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,8 @@ esac AC_SUBST([platform_defs]) AC_MSG_CHECKING(for --enable-debug) -AC_ARG_ENABLE(debug, [ --enable-debug Enable debug features], +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], [Enable debug features]), [ AC_MSG_RESULT(yes) debug_defs="-DLDAP_DEBUG" @@ -82,12 +83,27 @@ AC_ARG_ENABLE(debug, [ --enable-debug Enable debug features], ]) AC_SUBST([debug_defs]) +if test -z "$enable_tests" ; then + enable_tests=yes # default is on - --disable-tests to disable +fi +AC_MSG_CHECKING(for --enable-tests) +AC_ARG_ENABLE(tests, + AS_HELP_STRING([--enable-tests], [Enable tests to be built (default: yes)])) +if test "$enable_tests" = "yes" ; then + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi +AM_CONDITIONAL(enable_tests,test "$enable_tests" = "yes") + AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME]) m4_include(m4/nspr.m4) m4_include(m4/nss.m4) m4_include(m4/mozldap.m4) +if test "$enable_tests" = "yes" ; then m4_include(m4/sasl.m4) +fi m4_include(m4/icu.m4) m4_include(m4/fhs.m4) diff --git a/lib/libadminutil/acclanglist.c b/lib/libadminutil/acclanglist.c index 95beef2..3c1d318 100644 --- a/lib/libadminutil/acclanglist.c +++ b/lib/libadminutil/acclanglist.c @@ -1,39 +1,21 @@ /** BEGIN COPYRIGHT BLOCK - * This Program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation; version 2 of the License. - * - * This Program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with - * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA. - * - * In addition, as a special exception, Red Hat, Inc. gives You the additional - * right to link the code of this Program with code not covered under the GNU - * General Public License ("Non-GPL Code") and to distribute linked combinations - * including the two, subject to the limitations in this paragraph. Non-GPL Code - * permitted under this exception must only link to the code of this Program - * through those well defined interfaces identified in the file named EXCEPTION - * found in the source code files (the "Approved Interfaces"). The files of - * Non-GPL Code may instantiate templates or use macros or inline functions from - * the Approved Interfaces without causing the resulting work to be covered by - * the GNU General Public License. Only Red Hat, Inc. may make changes or - * additions to the list of Approved Interfaces. You must obey the GNU General - * Public License in all respects for all of the Program code and other code used - * in conjunction with the Program except the Non-GPL Code covered by this - * exception. If you modify this file, you may extend this exception to your - * version of the file, but you are not obligated to do so. If you do not wish to - * provide this exception without modification, you must delete this exception - * statement from your version and license this file solely under the GPL without - * exception. - * - * - * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. + * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission. * Copyright (C) 2005 Red Hat, Inc. * All rights reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation version + * 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * END COPYRIGHT BLOCK **/ #include diff --git a/m4/icu.m4 b/m4/icu.m4 index e6ccba3..450a470 100644 --- a/m4/icu.m4 +++ b/m4/icu.m4 @@ -100,3 +100,7 @@ if test -z "$icu_lib"; then AC_MSG_ERROR([ICU not found, specify with --with-icu.]) fi fi + +if test ! -f "$icu_bin/genrb" ; then + AC_MSG_ERROR([genrb not found in $icu_bin - please specify ICU bin directory]) +fi