[go: up one dir, main page]

File: configure.in

package info (click to toggle)
libcommoncpp2 1.0.13-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,740 kB
  • ctags: 2,860
  • sloc: cpp: 18,857; sh: 8,451; ansic: 1,546; makefile: 299; xml: 5
file content (158 lines) | stat: -rw-r--r-- 3,883 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# Copyright (C) 1999-2002 Open Source Telecom Corporation.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

AC_INIT(src/thread.cpp)
VERSION="1.0.13"
LT_RELEASE="1.0"
LT_VERSION="0:11"
AC_CONFIG_AUX_DIR(config)
AC_CANONICAL_SYSTEM
AC_PROG_CC
OST_PROG_CC_POSIX
NP_PROG_MSC
AM_PROG_LIBTOOL
AM_INIT_AUTOMAKE(commoncpp2, [$VERSION])
AM_CONFIG_HEADER(include/config.h)

STAGE2=""

case "$target_os" in
darwin*)
	STAGE2="macosx"
	;;
esac

AC_SUBST(STAGE2)

if test "$prefix" != "/usr" ; then
	if test -d "$prefix" ; then
		bprefix="$prefix"
	else
		bprefix=/usr/local
	fi
	if test -d $bprefix/include ; then
		CXXFLAGS="$CXXFLAGS -I$bprefix/include"
	fi
	if test -d $bprefix/lib ; then
		LIBS="$LIBS -L$bprefix/lib"
	fi
fi

OST_PROG_COMMON
OST_PROG_LIBVER
OST_PROG_LIBRARY(CCXX,[$LT_VERSION])
OST_AUTOMAKE_MODE
OST_MAINTAINER_MODE
OST_WINVER
OST_WIN32
OST_CC_ENDIAN
OST_CC_FCNTL
OST_CC_TYPES
OST_CC_SIGNAL
OST_CC_STRING
OST_CC_GETOPT
OST_CC_DYNAMIC
OST_LIB_PTHREAD
OST_LIB_REENTRANT
OST_LIB_SOCKET
OST_LIB_POLL
OST_LIB_ZLIB

AC_ARG_WITH(xml,      [  --without-xml           Disable xml support],
        ost_cv_xml_config=false,
        [OST_LIB_XML])

AC_ARG_WITH(ftp,      [  --with-ftp              Enable ftp support],
	[AC_DEFINE(COMMON_FTP_SUPPORT)])

AC_ARG_WITH(memaudit,      [  --with-memaudit         Enable memory auditing],
	[AC_DEFINE(COMMON_MEMORY_AUDIT)])

AC_CHECK_HEADERS(sys/file.h sys/lockf.h syslog.h posix_evlog.h ss.h)

# C++ stuff must done after library and header
# (some C++ define require some header)
OST_CXX_PROGRAMMING
OST_CXX_EXCEPTIONS
OST_CXX_MUTABLE
OST_CXX_NAMESPACE
OST_CXX_IOSTREAM
OST_CXX_NEW_INIT
OST_SGI_STLPORT

# Are we using the GNU compiler?
if test $GCC = yes ; then
        WARN_FLAGS="-Wall -ansi -pedantic"
else
        WARN_FLAGS=""
fi
AC_SUBST(WARN_FLAGS)

# This should be integrated with the other OST_CXX_ functions in m4/ost_cxx.m4
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(sstream)
AC_LANG_RESTORE

AC_DEFINE(CCXX_CONFIG_H_)
OST_DEBUG
if test $ost_cv_gnuwin32 = yes ; then
	CCXX_DIR="\$(top_srcdir)/win32"
else
	if test $np_cv_prog_msc = yes ; then
		CCXX_DIR="\$(top_srcdir)/win32"
	else
		CCXX_DIR="\$(top_srcdir)/include"
	fi
fi
KDOC_DIR="\$(top_srcdir)/doc"
AC_SUBST(LT_RELEASE)
AC_SUBST(KDOC_DIR)
AC_SUBST(CCXX_DIR)
AC_SUBST(incprefix)
AM_CONDITIONAL(WIN32, test $ost_cv_gnuwin32 = yes)
AC_SUBST(ost_cv_dynloader)

# some peculiar things needed for cygwin dll builds and the currently broken toolchain...

BASE_LIB=""           
case "$target" in
	*-*-cygwin*)
	BASE_LIB="libccgnu2.la $XML_LIBS $ZSTREAM_LIBS"
	AC_DEFINE(CYGWIN_IMPORTS)
	;;
esac

#AC_ARG_WITH(dllserver,     [--with-cygwindll        Build cygwin as DLL],
#        BASE_LIB="libccgnu2.la",
#        BASE_LIB="")

AC_SUBST(BASE_LIB)

AM_CONDITIONAL(GETOPT_LONG, [test ! -z "$LIBGETOPTOBJS"])

AC_OUTPUT(src/ccgnu2-config src/Makefile win32/Makefile m4/Makefile \
config/Makefile doc/Makefile demo/Makefile include/Makefile \
include/cc++/Makefile Makefile template/Makefile commoncpp2.spec \
tests/Makefile commoncpp2.proto freebsd/Makefile freebsd/pkg-plist \
pkginfo win32/CCXX2.rc)

if test -f doc/html/index.html ; then
	ls doc/man3/*.3cc | sed -e 's:^doc/man3/:man/man3/:' | grep -v todo >>freebsd/pkg-plist
#	ls doc/html | sed -e 's:^:share/doc/commoncpp2/:'>>freebsd/pkg-plist
fi

cd include/cc++
cp -f ../config.h config.tmp
sed -e s!"@thrprefix@"!"$thrprefix"! -e s!"@USR_PREFIX@"!"$prefix"! \
	-e s!PACKAGE!CCXX_PACKAGE! -e s!VERSION!CCXX_VERSION! <config.tmp >config.h
cd ../..