[Fedora-directory-commits] adminserver/m4 adminutil.m4, NONE, 1.1 fhs.m4, NONE, 1.1 httpd.m4, NONE, 1.1 icu.m4, NONE, 1.1 modnss.m4, NONE, 1.1 mozldap.m4, NONE, 1.1 nspr.m4, NONE, 1.1 nss.m4, NONE, 1.1 setuputil.m4, NONE, 1.1
Richard Allen Megginson (rmeggins)
fedora-directory-commits at redhat.com
Wed May 9 00:26:41 UTC 2007
Author: rmeggins
Update of /cvs/dirsec/adminserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32253/adminserver/m4
Added Files:
adminutil.m4 fhs.m4 httpd.m4 icu.m4 modnss.m4 mozldap.m4
nspr.m4 nss.m4 setuputil.m4
Log Message:
Resolves: bug 239502, bug 186280
Description: adminserver: autotools, FHS, clean up CGI parameters
Fix Description: Too numerous to mention
--- NEW FILE adminutil.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for ADMINUTIL)
# check for --with-adminutil
AC_MSG_CHECKING(for --with-adminutil)
AC_ARG_WITH(adminutil, [ --with-adminutil=PATH Adminutil directory],
[
if test -d "$withval"/include -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
ADMINUTILDIR=$withval
adminutil_lib="-L$ADMINUTILDIR/lib"
adminutil_libdir="$ADMINUTILDIR/lib"
adminutil_incdir=$ADMINUTILDIR/include
if ! test -e "$adminutil_incdir/libadminutil/admutil.h" ; then
AC_MSG_ERROR([$withval include dir not found])
fi
adminutil_inc="-I$adminutil_incdir"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if ADMINUTIL is not found yet, try pkg-config
# last resort
if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then
AC_MSG_CHECKING(for adminutil with pkg-config)
AC_PATH_PROG(PKG_CONFIG, pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists adminutil; then
adminutil_inc=`$PKG_CONFIG --cflags-only-I adminutil`
adminutil_lib=`$PKG_CONFIG --libs-only-L adminutil`
adminutil_libdir=`$PKG_CONFIG --libs-only-L adminutil | sed -e s/-L// | sed -e s/\ .*$//`
else
AC_MSG_ERROR([ADMINUTIL not found, specify with --with-adminutil.])
fi
fi
fi
if test -z "$adminutil_inc" -o -z "$adminutil_lib"; then
AC_MSG_ERROR([ADMINUTIL not found, specify with --with-adminutil.])
fi
--- NEW FILE fhs.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for FHS)
# check for --with-fhs
AC_MSG_CHECKING(for --with-fhs)
AC_ARG_WITH(fhs, [ --with-fhs Use FHS layout],
[
with_fhs=yes
],
AC_MSG_RESULT(no))
if test "$with_fhs" = "yes"; then
AC_DEFINE([IS_FHS], [1], [Use FHS layout])
fi
--- NEW FILE httpd.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_PATH_PROG([HTTPD], [httpd.worker], [],
[$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin])
if test -z "$HTTPD" -o ! -x "$HTTPD" ; then
AC_PATH_PROG([HTTPD], [httpd], [],
[$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin])
if test -z "$HTTPD" -o ! -x "$HTTPD" ; then
AC_MSG_ERROR([Apache2 httpd server not found])
fi
fi
httpd_root=`$HTTPD -V | grep HTTPD_ROOT | cut -f2 -d=`
httpd_root=`eval echo $httpd_root`
httpd_conf_rel=`$HTTPD -V | grep SERVER_CONFIG_FILE | cut -f2 -d=`
httpd_conf_rel=`eval echo $httpd_conf_rel`
# Server version: Apache/2.2.2
verstr='Server version: Apache/'
httpd_ver=`$HTTPD -v | grep "Server version:" | sed -e s@$verstr@@`
case $httpd_ver in
2.2*) APACHE22=1 ;;
*) APACHE22= ;;
esac
httpdconf=${httpd_root}/${httpd_conf_rel}
AC_PATH_PROG([APXS], [apxs], [],
[$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin])
if test -n "$APXS" -a -x "$APXS" ; then
httpd_moddir=`$APXS -q LIBEXECDIR`
fi
if test -z "$httpd_moddir" ; then
httpd_moddir="$libdir/httpd/modules"
fi
--- NEW FILE icu.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for LIBICU)
# check for --with-icu
AC_MSG_CHECKING(for --with-icu)
AC_ARG_WITH(icu, [ --with-icu=PATH ICU directory],
[
if test -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
ICUDIR=$withval
icu_lib="-L$ICUDIR/lib"
else
echo
AC_MSG_ERROR([$withval not found])
fi
icu_inc="-I$withval/include"
icu_bin="$withval/bin"
],
AC_MSG_RESULT(no))
# check for --with-icu-inc
AC_MSG_CHECKING(for --with-icu-inc)
AC_ARG_WITH(icu-inc, [ --with-icu-inc=PATH ICU include directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
icu_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-icu-lib
AC_MSG_CHECKING(for --with-icu-lib)
AC_ARG_WITH(icu-lib, [ --with-icu-lib=PATH ICU library directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
icu_lib="-L$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-icu-bin
AC_MSG_CHECKING(for --with-icu-bin)
AC_ARG_WITH(icu-bin, [ --with-icu-bin=PATH ICU binary directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
icu_bin="$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if ICU is not found yet, try pkg-config
# last resort
if test -z "$icu_lib"; then
AC_MSG_CHECKING(for icu with icu-config)
AC_PATH_PROG(ICU_CONFIG, icu-config)
if test -n "$ICU_CONFIG"; then
icu_lib=`$ICU_CONFIG --ldflags-searchpath`
icu_libdir=`$ICU_CONFIG --libdir`
icu_inc=`$ICU_CONFIG --cppflags-searchpath`
icu_bin=`$ICU_CONFIG --bindir`
AC_MSG_RESULT([using system ICU])
else
AC_MSG_ERROR([ICU not found, specify with --with-icu.])
fi
fi
--- NEW FILE modnss.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for MODNSS)
# check for --with-modnss-lib
AC_MSG_CHECKING(for --with-modnss-lib)
AC_ARG_WITH(modnss-lib, [ --with-modnss-lib=PATH MODNSS library directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
modnss_lib="-L$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-modnss-bin
AC_MSG_CHECKING(for --with-modnss-bin)
AC_ARG_WITH(modnss-bin, [ --with-modnss-bin=PATH MODNSS binary directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
modnss_bin="$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# else, parse httpd.conf or httpconfdir/nss.conf
# else, punt
if test -z "$modnssbindir" ; then
modnssbindir="$sbindir"
fi
--- NEW FILE mozldap.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for LDAPSDK)
# check for --with-ldapsdk
AC_MSG_CHECKING(for --with-ldapsdk)
AC_ARG_WITH(ldapsdk, [ --with-ldapsdk=PATH Mozilla LDAP SDK directory],
[
if test -e "$withval"/include/ldap.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
LDAPSDKDIR=$withval
ldapsdk_inc="-I$LDAPSDKDIR/include"
ldapsdk_lib="-L$LDAPSDKDIR/lib"
ldapsdk_libdir="$LDAPSDKDIR/lib"
ldapsdk_bindir="$LDAPSDKDIR/bin"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-ldapsdk-inc
AC_MSG_CHECKING(for --with-ldapsdk-inc)
AC_ARG_WITH(ldapsdk-inc, [ --with-ldapsdk-inc=PATH Mozilla LDAP SDK include directory],
[
if test -e "$withval"/ldap.h
then
AC_MSG_RESULT([using $withval])
ldapsdk_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-ldapsdk-lib
AC_MSG_CHECKING(for --with-ldapsdk-lib)
AC_ARG_WITH(ldapsdk-lib, [ --with-ldapsdk-lib=PATH Mozilla LDAP SDK library directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
ldapsdk_lib="-L$withval"
ldapsdk_libdir="$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if LDAPSDK is not found yet, try pkg-config
# last resort
if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib" -o -z "$ldapsdk_libdir" -o -z "$ldapsdk_bindir"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_MSG_CHECKING(for mozldap with pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists mozldap6; then
mozldappkg=mozldap6
elif $PKG_CONFIG --exists mozldap; then
mozldappkg=mozldap
else
AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].])
fi
ldapsdk_inc=`$PKG_CONFIG --cflags-only-I $mozldappkg`
ldapsdk_lib=`$PKG_CONFIG --libs-only-L $mozldappkg`
ldapsdk_libdir=`$PKG_CONFIG --libs-only-L $mozldappkg | sed -e s/-L// | sed -e s/\ .*$//`
ldapsdk_bindir=`$PKG_CONFIG --variable=bindir $mozldappkg`
AC_MSG_RESULT([using system $mozldappkg])
fi
fi
if test -z "$ldapsdk_inc" -o -z "$ldapsdk_lib"; then
AC_MSG_ERROR([LDAPSDK not found, specify with --with-ldapsdk[-inc|-lib].])
fi
dnl default path for the ldap c sdk tools (see [210947] for more details)
if test -z "$ldapsdk_bindir" ; then
if [ -d $libdir/mozldap6 ] ; then
ldapsdk_bindir=$libdir/mozldap6
else
ldapsdk_bindir=$libdir/mozldap
fi
fi
dnl make sure the ldap sdk version is 6 or greater - we do not support
dnl the old 5.x or prior versions - the ldap server code expects the new
dnl ber types and other code used with version 6
save_cppflags="$CPPFLAGS"
CPPFLAGS="$ldapsdk_inc $nss_inc $nspr_inc"
AC_CHECK_HEADER([ldap.h], [isversion6=1], [isversion6=],
[#include <ldap-standard.h>
#if LDAP_VENDOR_VERSION < 600
#error The LDAP C SDK version is not supported
#endif
])
CPPFLAGS="$save_cppflags"
if test -z "$isversion6" ; then
AC_MSG_ERROR([The LDAPSDK version in $ldapsdk_inc/ldap-standard.h is not supported])
fi
--- NEW FILE nspr.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for NSPR)
# check for --with-nspr
AC_MSG_CHECKING(for --with-nspr)
AC_ARG_WITH(nspr, [ --with-nspr=PATH Netscape Portable Runtime (NSPR) directory],
[
if test -e "$withval"/include/nspr.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
NSPRDIR=$withval
nspr_inc="-I$NSPRDIR/include"
nspr_lib="-L$NSPRDIR/lib"
nspr_libdir="$NSPRDIR/lib"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-nspr-inc
AC_MSG_CHECKING(for --with-nspr-inc)
AC_ARG_WITH(nspr-inc, [ --with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory],
[
if test -e "$withval"/nspr.h
then
AC_MSG_RESULT([using $withval])
nspr_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-nspr-lib
AC_MSG_CHECKING(for --with-nspr-lib)
AC_ARG_WITH(nspr-lib, [ --with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
nspr_lib="-L$withval"
nspr_libdir="$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if NSPR is not found yet, try pkg-config
# last resort
if test -z "$nspr_inc" -o -z "$nspr_lib" -o -z "$nspr_libdir"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_MSG_CHECKING(for nspr with pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists nspr; then
nspr_inc=`$PKG_CONFIG --cflags-only-I nspr`
nspr_lib=`$PKG_CONFIG --libs-only-L nspr`
nspr_libdir=`$PKG_CONFIG --libs-only-L nspr | sed -e s/-L// | sed -e s/\ .*$//`
AC_MSG_RESULT([using system NSPR])
elif $PKG_CONFIG --exists dirsec-nspr; then
nspr_inc=`$PKG_CONFIG --cflags-only-I dirsec-nspr`
nspr_lib=`$PKG_CONFIG --libs-only-L dirsec-nspr`
nspr_libdir=`$PKG_CONFIG --libs-only-L dirsec-nspr | sed -e s/-L// | sed -e s/\ .*$//`
AC_MSG_RESULT([using system dirsec NSPR])
else
AC_MSG_ERROR([NSPR not found, specify with --with-nspr.])
fi
fi
fi
--- NEW FILE nss.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for NSS)
# check for --with-nss
AC_MSG_CHECKING(for --with-nss)
AC_ARG_WITH(nss, [ --with-nss=PATH Network Security Services (NSS) directory],
[
if test -e "$withval"/include/nss.h -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
NSSDIR=$withval
nss_inc="-I$NSSDIR/include"
nss_lib="-L$NSSDIR/lib"
nss_libdir="$NSSDIR/lib"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-nss-inc
AC_MSG_CHECKING(for --with-nss-inc)
AC_ARG_WITH(nss-inc, [ --with-nss-inc=PATH Network Security Services (NSS) include directory],
[
if test -e "$withval"/nss.h
then
AC_MSG_RESULT([using $withval])
nss_inc="-I$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# check for --with-nss-lib
AC_MSG_CHECKING(for --with-nss-lib)
AC_ARG_WITH(nss-lib, [ --with-nss-lib=PATH Network Security Services (NSS) library directory],
[
if test -d "$withval"
then
AC_MSG_RESULT([using $withval])
nss_lib="-L$withval"
nss_libdir="$withval"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if NSS is not found yet, try pkg-config
# last resort
if test -z "$nss_inc" -o -z "$nss_lib" -o -z "$nss_libdir"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_MSG_CHECKING(for nss with pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists nss; then
nss_inc=`$PKG_CONFIG --cflags-only-I nss`
nss_lib=`$PKG_CONFIG --libs-only-L nss`
nss_libdir=`$PKG_CONFIG --libs-only-L nss | sed -e s/-L// | sed -e s/\ .*$//`
AC_MSG_RESULT([using system NSS])
elif $PKG_CONFIG --exists dirsec-nss; then
nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss`
nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss`
nss_libdir=`$PKG_CONFIG --libs-only-L dirsec-nss | sed -e s/-L// | sed -e s/\ .*$//`
AC_MSG_RESULT([using system dirsec NSS])
else
AC_MSG_ERROR([NSS not found, specify with --with-nss.])
fi
fi
fi
--- NEW FILE setuputil.m4 ---
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# END COPYRIGHT BLOCK
AC_CHECKING(for SETUPUTIL)
# check for --with-setuputil
AC_MSG_CHECKING(for --with-setuputil)
AC_ARG_WITH(setuputil, [ --with-setuputil=PATH Setuputil directory],
[
if test -d "$withval"/include -a -d "$withval"/lib
then
AC_MSG_RESULT([using $withval])
SETUPUTILDIR=$withval
setuputil_lib="-L$SETUPUTILDIR/lib"
setuputil_incdir=$SETUPUTILDIR/include
if ! test -e "$setuputil_incdir/setuputil/setupapi.h" ; then
AC_MSG_ERROR([$withval include dir not found])
fi
setuputil_inc="-I$setuputil_incdir"
setuputil_bin="$SETUPUTILDIR/bin"
else
echo
AC_MSG_ERROR([$withval not found])
fi
],
AC_MSG_RESULT(no))
# if SETUPUTIL is not found yet, try pkg-config
# last resort
if test -z "$setuputil_inc" -o -z "$setuputil_lib"; then
AC_MSG_CHECKING(for setuputil with pkg-config)
AC_PATH_PROG(PKG_CONFIG, pkg-config)
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists setuputil; then
setuputil_inc=`$PKG_CONFIG --cflags-only-I setuputil`
setuputil_lib=`$PKG_CONFIG --libs-only-L setuputil`
setuputil_bin=`$PKG_CONFIG --variable=bindir setuputil`
else
AC_MSG_ERROR([SETUPUTIL not found, specify with --with-setuputil.])
fi
fi
fi
if test -z "$setuputil_inc" -o -z "$setuputil_lib"; then
AC_MSG_ERROR([SETUPUTIL not found, specify with --with-setuputil.])
fi
More information about the 389-commits
mailing list