205 lines
5.1 KiB
Plaintext
205 lines
5.1 KiB
Plaintext
|
#######################################################################
|
||
|
#
|
||
|
# Copyright (C) 2004 Novell, Inc.
|
||
|
#
|
||
|
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
|
#
|
||
|
# Author: Juan Carlos Luciani <jluciani@novell.com>
|
||
|
#
|
||
|
#######################################################################
|
||
|
|
||
|
AC_INIT(c-sharp-net-credential/NetCredential.cs)
|
||
|
AC_CANONICAL_SYSTEM
|
||
|
AM_INIT_AUTOMAKE(clientpasswordmanager, 0.1.1)
|
||
|
RELEASE=`date +%Y%m%d_%H%M`
|
||
|
AC_SUBST(RELEASE)
|
||
|
AM_MAINTAINER_MODE
|
||
|
|
||
|
#
|
||
|
# Check for a valid C# compiler
|
||
|
#
|
||
|
AC_CHECK_PROG(CSC, csc, csc)
|
||
|
test -z "$CSC" && AC_CHECK_PROG(CSC, mcs, mcs)
|
||
|
test -z "$CSC" && AC_MSG_ERROR([no acceptable C Sharp compiler found in \$PATH])
|
||
|
|
||
|
case $CSC in
|
||
|
#
|
||
|
# Mono-specific configuration
|
||
|
#
|
||
|
mcs)
|
||
|
CSC_EXEFLAG=/target:exe
|
||
|
CSC_LIBFLAG=/target:library
|
||
|
CSC_EXEFLAG=/target:exe
|
||
|
CSC_WINEXEFLAG=/target:winexe
|
||
|
CSCFLAGS='/d:MONO /warn:4 /d:TRACE'
|
||
|
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||
|
CSCFLAGS_OPTIMIZE="/optimize+"
|
||
|
MONO=mono
|
||
|
MONO_DEBUG='mono --debug'
|
||
|
MONO_PATH=
|
||
|
SYSTEM_XML='System.Xml.dll'
|
||
|
;;
|
||
|
#
|
||
|
# .NET-specific configuration
|
||
|
#
|
||
|
csc)
|
||
|
CSC_EXEFLAG=/target:exe
|
||
|
CSC_LIBFLAG=/target:library
|
||
|
CSC_EXEFLAG=/target:exe
|
||
|
CSC_WINEXEFLAG=/target:winexe
|
||
|
CSCFLAGS='/d:DOTNET /warn:4 /d:TRACE /nologo'
|
||
|
CSCFLAGS_DEBUG="/debug+ /d:DEBUG"
|
||
|
CSCFLAGS_OPTIMIZE="/optimize+"
|
||
|
MONO=
|
||
|
MONO_DEBUG=
|
||
|
MONO_PATH=
|
||
|
SYSTEM_XML='System.XML.dll'
|
||
|
;;
|
||
|
esac
|
||
|
AC_SUBST(CSC)
|
||
|
AC_SUBST(CSC_EXEFLAG)
|
||
|
AC_SUBST(CSC_LIBFLAG)
|
||
|
AC_SUBST(CSC_WINEXEFLAG)
|
||
|
AC_SUBST(CSCFLAGS)
|
||
|
AC_SUBST(MONO)
|
||
|
AC_SUBST(MONO_PATH)
|
||
|
AC_SUBST(SYSTEM_XML)
|
||
|
|
||
|
SRCDIR='$(top_srcdir)'
|
||
|
DOCDIR="$SRCDIR/doc"
|
||
|
|
||
|
AC_SUBST(SRCDIR)
|
||
|
AC_SUBST(DOCDIR)
|
||
|
|
||
|
EMPTY=
|
||
|
SPACE='$(EMPTY) $(EMPTY)'
|
||
|
|
||
|
AC_SUBST(EMPTY)
|
||
|
AC_SUBST(SPACE)
|
||
|
|
||
|
#
|
||
|
# Check for a valid operating system
|
||
|
#
|
||
|
case $host_os in
|
||
|
linux*)
|
||
|
TARGET_OS='linux'
|
||
|
;;
|
||
|
cygwin*)
|
||
|
TARGET_OS='windows'
|
||
|
;;
|
||
|
*)
|
||
|
AC_MSG_ERROR([Unknown host_os: $host_os])
|
||
|
;;
|
||
|
esac
|
||
|
AC_SUBST(TARGET_OS)
|
||
|
AM_CONDITIONAL(LINUX, test "$TARGET_OS" = "linux")
|
||
|
AM_CONDITIONAL(WINDOWS, test "$TARGET_OS" = "windows")
|
||
|
|
||
|
#
|
||
|
# Set platform-specific variables
|
||
|
#
|
||
|
case $TARGET_OS in
|
||
|
#
|
||
|
# Linux-specific configuration
|
||
|
#
|
||
|
linux)
|
||
|
#
|
||
|
# Set variables
|
||
|
#
|
||
|
COMMON_CLEAN_FILES=''
|
||
|
ICON_EXT='.ico'
|
||
|
ICON_FLAG='/resource:'
|
||
|
PLATFORM_SUBDIRS=$LINUX_SUBDIRS
|
||
|
SEP='/'
|
||
|
;;
|
||
|
#
|
||
|
# Windows-specific configuration
|
||
|
#
|
||
|
windows)
|
||
|
COMMON_CLEAN_FILES='*.suo */*.suo *.csproj.user */*.csproj.user bin obj */bin */obj *.xml */*.xml *.pdb */*.pdb'
|
||
|
ICON_EXT='.ico'
|
||
|
ICON_FLAG='/win32icon:'
|
||
|
PLATFORM_SUBDIRS=$WINDOWS_SUBDIRS
|
||
|
SEP='$(EMPTY)\\$(EMPTY)'
|
||
|
;;
|
||
|
esac
|
||
|
AC_SUBST(COMMON_CLEAN_FILES)
|
||
|
AC_SUBST(ICON_EXT)
|
||
|
AC_SUBST(ICON_FLAG)
|
||
|
AC_SUBST(PLATFORM_SUBDIRS)
|
||
|
AC_SUBST(SEP)
|
||
|
|
||
|
#
|
||
|
# Run standard macros
|
||
|
#
|
||
|
AM_PROG_CC_STDC
|
||
|
AC_PROG_INSTALL
|
||
|
AC_HEADER_STDC
|
||
|
|
||
|
#
|
||
|
# Handle --enable-debug
|
||
|
#
|
||
|
AC_ARG_ENABLE(debug, [
|
||
|
--enable-debug configure the Makefiles to build in DEBUG mode],
|
||
|
[case "${enableval}" in
|
||
|
yes) enable_debug=true ;;
|
||
|
no) enable_debug=false ;;
|
||
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
|
||
|
esac],[enable_debug=false])
|
||
|
AM_CONDITIONAL(DEBUG, test x$enable_debug = xtrue)
|
||
|
if test "$enable_debug" = "true"
|
||
|
then
|
||
|
# Build debug version.
|
||
|
CFLAGS="$CFLAGS_DEBUG $CFLAGS"
|
||
|
CSCFLAGS="$CSCFLAGS_DEBUG $CSCFLAGS"
|
||
|
CXXFLAGS="$CXXFLAGS_DEBUG $CXXFLAGS"
|
||
|
DEVENV_CONFIGURATION=Debug
|
||
|
MONO=$MONO_DEBUG
|
||
|
else
|
||
|
# Build optimized version.
|
||
|
CFLAGS="$CFLAGS_OPTIMIZE $CFLAGS"
|
||
|
CSCFLAGS="$CSCFLAGS_OPTIMIZE $CSCFLAGS"
|
||
|
CXXFLAGS="$CXXFLAGS_OPTIMIZE $CXXFLAGS"
|
||
|
DEVENV_CONFIGURATION=Release
|
||
|
fi
|
||
|
AC_SUBST(CSCFLAGS)
|
||
|
AC_SUBST(DEVENV_CONFIGURATION)
|
||
|
|
||
|
#
|
||
|
# Configure PKG_CONFIG
|
||
|
#
|
||
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||
|
if test "x$PKG_CONFIG" = "xno"; then
|
||
|
AC_MSG_ERROR([You need to install pkg-config])
|
||
|
fi
|
||
|
|
||
|
#
|
||
|
# Configure files
|
||
|
#
|
||
|
AC_OUTPUT([
|
||
|
Makefile
|
||
|
c-sharp-net-credential/Makefile
|
||
|
c-sharp-password-dialog/Makefile
|
||
|
c-sharp-username-dialog/Makefile
|
||
|
c-sharp-utilities/Makefile
|
||
|
package/Makefile
|
||
|
package/windows/Makefile
|
||
|
package/windows/clientpasswordmanager-msm/Makefile
|
||
|
package/linux/Makefile
|
||
|
package/linux/clientpasswordmanager.spec
|
||
|
])
|
||
|
|
||
|
|