[Fedora-directory-commits] setuputil Makefile.am, NONE, 1.1 configure.ac, NONE, 1.1 setuputil.pc.in, NONE, 1.1

Noriko Hosoi (nhosoi) fedora-directory-commits at redhat.com
Thu Apr 5 01:51:31 UTC 2007


Author: nhosoi

Update of /cvs/dirsec/setuputil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2631

Added Files:
	Makefile.am configure.ac setuputil.pc.in 
Log Message:
Resolves: #234893
Summary: Build SetupUtil with autotools (Comment #13, #16)



--- NEW FILE Makefile.am ---
# look for included m4 files in the ./m4/ directory
ACLOCAL_AMFLAGS = -I m4

#------------------------
# Compiler Flags
#------------------------
BUILDNUM := $(shell perl $(srcdir)/buildnum.pl)
PLATFORM_DEFINES = @platform_defs@ -D at platform@
DEBUG_DEFINES = @debug_defs@
SETUPUTIL_DEFINES = -DBUILD_NUM=$(BUILDNUM)
SETUPUTIL_INCLUDES = -I$(srcdir)/include -I$(srcdir)/installer/include -I$(srcdir)/installer/lib -I$(srcdir)/installer/unix -I$(srcdir)/installer/unix/lib
SETUPUTIL_CPPFLAGS = $(PLATFORM_DEFINES) $(DEBUG_DEFINES) $(SETUPUTIL_DEFINES) $(SETUPUTIL_INCLUDES) $(PATH_DEFINES) @ldapsdk_inc@

#------------------------
# Linker Flags
#------------------------
NSPR_LINK = @nspr_lib@ -lplc4 -lplds4 -lnspr4
NSS_LINK = @nss_lib@ -lssl3 -lnss3 -lsoftokn3
LDAPSDK_LINK = @ldapsdk_lib@ -lssldap60 -lprldap60 -lldap60 -lldif60
SASL_LINK = @sasl_lib@ -lsasl2
SVRCORE_LINK = @svrcore_lib@ -lsvrcore

#------------------------
# Install Path
#------------------------
dssetuplibdir = $(libdir)
dssetupsbindir = $(sbindir)
dssetupconfigdir = $(datadir)@dssetupdir@
dssetupdocdir = $(datadir)/doc at dssetupdir@
dssetupincludedir = $(includedir)@dssetupdir@

#------------------------
# Build Products
#------------------------
dssetupsbin_PROGRAMS = dssetup-bin dsuninstall-bin

dssetuplib_LTLIBRARIES = libdsinstall.la

#------------------------
# Installed Files
#------------------------
dssetupinclude_DATA = $(srcdir)/include/version.h \
    $(srcdir)/installer/include/code.h \
    $(srcdir)/installer/include/global.h \
    $(srcdir)/installer/include/ldapu.h \
    $(srcdir)/installer/include/nsdefs.h \
    $(srcdir)/installer/include/nsutils.h \
    $(srcdir)/installer/include/setupapi.h \
    $(srcdir)/installer/include/setupdefs.h \
    $(srcdir)/installer/include/setupinst.h \
    $(srcdir)/installer/include/setupldap.h \
    $(srcdir)/installer/include/setupnvpair.h \
    $(srcdir)/installer/include/uninstall.h \
    $(srcdir)/installer/include/utf8.h \
    $(srcdir)/installer/lib/misc.h \
    $(srcdir)/installer/lib/prodinfo.h \
    $(srcdir)/installer/unix/lib/dialog.h \
    $(srcdir)/installer/unix/lib/ux-util.h


dssetupconfig_DATA = $(srcdir)/installer/inf/setup.inf \
    $(srcdir)/installer/inf/silent.inf \
    $(srcdir)/installer/inf/setup.res

dssetupdoc_DATA = $(srcdir)/installer/relnotes/LICENSE.txt \
    $(srcdir)/installer/relnotes/README.txt

dssetupsbin_SCRIPTS = $(srcdir)/installer/scripts/unzip_wrapper.pl \
    $(srcdir)/wrappers/dssetup \
    $(srcdir)/wrappers/dsuninstall

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(PACKAGE_NAME).pc

#////////////////////////////////////////////////////////////////
#
#   Dynamic Libraries
#
#////////////////////////////////////////////////////////////////

#------------------------
# libdsinstall
#------------------------
libdsinstall_la_SOURCES = installer/lib/code.cpp \
    installer/lib/schema.cpp \
    installer/lib/global.cpp \
    installer/lib/setupapi.cpp \
    installer/lib/ldapu.cpp \
    installer/lib/setupinst.cpp \
    installer/lib/misc.cpp \
    installer/lib/setupldap.cpp \
    installer/lib/nsdefs.cpp \
    installer/lib/setupnvpair.cpp \
    installer/lib/nsutils.cpp \
    installer/lib/uninstall.cpp \
    installer/lib/prodinfo.cpp \
    installer/lib/utf8.cpp \
    installer/unix/lib/ux-util.cc \
    installer/unix/lib/ux-curse.c \
    installer/unix/lib/dialog.cc \
    installer/unix/lib/ux-wrapper.cc

libdsinstall_la_CPPFLAGS = $(SETUPUTIL_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@
libdsinstall_la_LIBADD = $(LDAPSDK_LINK) 
libdsinstall_la_LDFLAGS = -version-info 1:0:0

#////////////////////////////////////////////////////////////////
#
#   Programs
#
#////////////////////////////////////////////////////////////////
#------------------------
# dssetup-bin
#------------------------
dssetup_bin_SOURCES = installer/unix/setup.cc \
    installer/unix/installer.cc \
    installer/unix/dl-inst.cc \
    installer/unix/product.cc \
    installer/unix/dl-common.cc \
    installer/unix/wizard.cc \
    installer/unix/ux-setup.cc \
    installer/unix/uxres.cc \
    installer/unix/uxres_data.cc

dssetup_bin_CPPFLAGS = $(SETUPUTIL_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@
dssetup_bin_LDADD = libdsinstall.la $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK) $(SASL_LINK) @platform_libs@

#------------------------
# dsuninstall-bin
#------------------------
dsuninstall_bin_SOURCES = installer/unix/uninstall.cc \
    installer/unix/uninstaller.cc \
    installer/unix/dl-uninst.cc \
    installer/unix/inst_stub.cc \
    installer/unix/product.cc \
    installer/unix/dl-common.cc \
    installer/unix/wizard.cc \
    installer/unix/ux-setup.cc \
    installer/unix/uxres.cc \
    installer/unix/uxres_data.cc

dsuninstall_bin_CPPFLAGS = $(SETUPUTIL_CPPFLAGS) @ldapsdk_inc@ @nss_inc@ @nspr_inc@
dsuninstall_bin_LDADD = libdsinstall.la $(LDAPSDK_LINK) $(NSS_LINK) $(NSPR_LINK) $(SASL_LINK) @platform_libs@

fixupcmd = sed \
	-e 's, at prefix\@,$(prefix),g' \
	-e 's, at exec_prefix\@,$(exec_prefix),g' \
	-e 's, at bindir\@,$(bindir),g' \
	-e 's, at bindir\@,$(bindir),g' \
	-e 's, at sbindir\@,$(sbindir),g' \
	-e 's, at libdir\@,$(libdir),g' \
	-e 's, at includedir\@,$(includedir),g' \
	-e 's, at nspr_libdir\@,$(nspr_libdir),g' \
	-e 's, at nss_libdir\@,$(nss_libdir),g' \
	-e 's, at ldapsdk_libdir\@,$(ldapsdk_libdir),g' \
	-e 's, at ldapsdk_bindir\@,$(ldapsdk_bindir),g' \
	-e 's, at PACKAGE_NAME\@,$(PACKAGE_NAME),g' \
	-e 's, at PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' 

%: %.in
	mkdir -p $(dir $@)
	$(fixupcmd) $^ > $@



--- NEW FILE configure.ac ---
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
# This version is the version returned by dssetup -v
AC_INIT([setuputil], [1.1.0], [http://bugzilla.redhat.com/])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
AM_MAINTAINER_MODE
AC_CANONICAL_HOST

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL

# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
AC_C_CONST
AC_HEADER_STDBOOL
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([endpwent getcwd gethostbyname inet_ntoa memset mkdir putenv rmdir socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr])

AC_MSG_CHECKING(for --enable-debug)
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]),
[
  AC_MSG_RESULT(yes)
  debug_defs="-DDEBUG"
],
[
  AC_MSG_RESULT(no)
  debug_defs=""
])
AC_SUBST([debug_defs])

# WINNT should be true if building on Windows system not using
# cygnus, mingw, or the like and using cmd.exe as the shell
AM_CONDITIONAL([WINNT], false)

# Deal with platform dependent defines
# relative to sysconfdir
case $host in
  *-*-linux*)
    platform_defs="-DXP_UNIX -DLINUX"
    platform="linux"
	platform_libs=""
    # relative to sysconfdir
    ;;
  ia64-hp-hpux*)
    platform_defs="-DXP_UNIX"
    platform="hpux"
	platform_libs=""
    ;;
  hppa*-hp-hpux*)
    platform_defs="-DXP_UNIX"
    platform="hpux"
    ;;
  sparc-sun-solaris*)
    platform_defs="-DXP_UNIX"
    platform="solaris"
    platform_libs="-lCstd -lCrun"
    ;;
  *)
    platform=""
    ;;
esac
AC_SUBST([platform_defs])
AC_SUBST([platform])
AC_SUBST([platform_libs])

AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(endwin, [curses Hcurses])

AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])

# Check for library dependencies
m4_include(m4/nspr.m4)
m4_include(m4/nss.m4)
m4_include(m4/mozldap.m4)
m4_include(m4/sasl.m4)
m4_include(m4/fhs.m4)

# installation paths - by default, configure will just
# use /usr as the prefix for everything, which means
# /usr/etc and /usr/var.  FHS sez to use /etc and /var.
if test "$with_fhs" = "yes"; then
  ac_default_prefix=/usr
  prefix=$ac_default_prefix
  exec_prefix=$prefix
dnl as opposed to the default /usr/etc
  sysconfdir='/etc'
dnl as opposed to the default /usr/var
  localstatedir='/var'
fi

# installation paths
#relative to datadir,includedir
dssetupdir=/$PACKAGE_NAME
AC_SUBST(dssetupdir)

AC_DEFINE([PROPERTYDIR], ["@datadir@@dssetupdir@"], [property dir])

# write out paths for binary components
AC_SUBST(nspr_inc)
AC_SUBST(nspr_lib)
AC_SUBST(nspr_libdir)
AC_SUBST(nss_inc)
AC_SUBST(nss_lib)
AC_SUBST(nss_libdir)
AC_SUBST(ldapsdk_inc)
AC_SUBST(ldapsdk_lib)
AC_SUBST(ldapsdk_libdir)
AC_SUBST(ldapsdk_bindir)
AC_SUBST(sasl_inc)
AC_SUBST(sasl_lib)
AC_SUBST(sasl_libdir)

AC_CONFIG_FILES([Makefile])

AC_OUTPUT


--- NEW FILE setuputil.pc.in ---
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
sbindir=@sbindir@
includedir=@includedir@

Name: @PACKAGE_NAME@
Description: Utility with library for directory server installation
Version: @PACKAGE_VERSION@
Requires: nspr, nss, mozldap
Libs: -ldsinstall
Cflags: -I${includedir}/@PACKAGE_NAME@





More information about the Fedora-directory-commits mailing list