Skip to content

Commit c2a6416

Browse files
committed
build-sys: modernize
Run autoupdate and fix remaining warnings. This also fixes compiling with mingw64 from f18. And make the build silent.
1 parent 009a95c commit c2a6416

File tree

5 files changed

+64
-53
lines changed

5 files changed

+64
-53
lines changed

Makefile.am

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919

2020
# Process this file with automake to create Makefile.in.
2121

22+
makeflags_ = $(makeflags_$(AM_DEFAULT_VERBOSITY))
23+
makeflags_0 = --no-print-directory -s
24+
makeflags_1 =
25+
AM_MAKEFLAGS = $(makeflags_$(V))
26+
2227
SUBDIRS = src/libckyapplet src/coolkey
2328

2429
if BUILD_PK11INSTALL
@@ -29,8 +34,4 @@ ACLOCAL_AMFLAGS = -I m4
2934

3035
EXTRA_DIST = coolkey.spec LICENSE
3136

32-
DISTCLEANFILES =
33-
34-
AUTOMAKE_OPTIONS = foreign
35-
3637

autogen.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
test -n "$srcdir" || srcdir=$(dirname "$0")
4+
test -n "$srcdir" || srcdir=.
5+
(
6+
cd "$srcdir" &&
7+
mkdir -p m4 &&
8+
AUTOPOINT='intltoolize --automake --copy' autoreconf -fiv -Wall
9+
) || exit
10+
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"

configure.in configure.ac

+47-46
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# $Id$
22
#
33
# BEGIN COPYRIGHT BLOCK
4-
# Copyright (C) 2005 Red Hat, Inc.
4+
# Copyright (C) 2005-2013 Red Hat, Inc.
55
# All rights reserved.
66
#
77
# This library is free software; you can redistribute it and/or
@@ -18,22 +18,22 @@
1818
# License along with this library; if not, write to the Free Software
1919
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2020
# END COPYRIGHT BLOCK
21-
22-
# Require autoconf 2.52
23-
AC_PREREQ(2.52)
21+
AC_PREREQ([2.69])
2422

2523
# Process this file with autoconf to produce a configure script.
26-
AC_INIT(coolkey,[1.2.0])
24+
AC_INIT([coolkey],[1.2.0])
2725
AC_CONFIG_SRCDIR([src/coolkey/coolkey.cpp])
26+
AC_CONFIG_MACRO_DIR([m4])
2827
AC_CANONICAL_TARGET([])
29-
AM_INIT_AUTOMAKE()
28+
AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip tar-ustar foreign -Wall])
3029
AC_CONFIG_HEADERS([config.h])
3130

32-
AM_MAINTAINER_MODE
31+
AM_MAINTAINER_MODE([enable])
32+
AM_SILENT_RULES([yes])
3333

3434
# Add argument for debuging
35-
AC_ARG_ENABLE(debug,
36-
AC_HELP_STRING([--enable-debug],[add debugging code (default=yes)]))
35+
AC_ARG_ENABLE(debug,
36+
AS_HELP_STRING([--enable-debug],[add debugging code (default=yes)]))
3737
if test "$enable_debug" = "no" -o "$enable_debug" = "false"
3838
then
3939
AC_MSG_WARN([Debugging support is completely disabled!])
@@ -52,51 +52,52 @@ UNIX=0
5252
AC_MSG_CHECKING([platform type: ])
5353
case "$host" in
5454
*-*-win*|*-*-cygwin*)
55-
AC_MSG_RESULT([Windows])
56-
WINDOWS=1
57-
ZLIB_CFLAGS=-I${ZLIB_INCLUDE}
58-
ZLIB_LIBS=${ZLIB_LIB}/zdll.dll
59-
#OS_FLAGS=`echo $INCLUDE | tr '[[:upper:]]' '[[:lower:]]' | sed -e 's;\\\\;/;g' -e 's;.:;/cygdrive/&/;g' -e 's;:;;g' -e 's;//;/;g' -e 's/;/\" -I\"/g' -e 's;^;-I\";' -e 's;$;\";'`
60-
CPPFLAGS="$CPPFLAGS $OS_FLAGS -DWIN32"
61-
LDFLAGS="$LDFLAGS"
62-
AC_MSG_WARN([changing CPPFLAGS = $CPPFLAGS ] );
63-
SCARD_LIB_NAME="winscard.dll"
64-
# override config defaults for windows
65-
CC=cl
66-
CXX=cl
67-
CXXFLAGS="$CXXFLAGS /EHsc"
68-
#
69-
# Sigh, prevents us from overriding it with --libdir= in the config
70-
* line, but we can still override it in the make line.
71-
#
72-
libdir=`cygpath ${WINDIR}/system32`
73-
;;
55+
AC_MSG_RESULT([Windows])
56+
WINDOWS=1
57+
ZLIB_CFLAGS=-I${ZLIB_INCLUDE}
58+
ZLIB_LIBS=${ZLIB_LIB}/zdll.dll
59+
#OS_FLAGS=`echo $INCLUDE | tr '[[:upper:]]' '[[:lower:]]' | sed -e 's;\\\\;/;g' -e 's;.:;/cygdrive/&/;g' -e 's;:;;g' -e 's;//;/;g' -e 's/;/\" -I\"/g' -e 's;^;-I\";' -e 's;$;\";'`
60+
CPPFLAGS="$CPPFLAGS $OS_FLAGS -DWIN32"
61+
LDFLAGS="$LDFLAGS"
62+
AC_MSG_WARN([changing CPPFLAGS = $CPPFLAGS ] );
63+
SCARD_LIB_NAME="winscard.dll"
64+
# override config defaults for windows
65+
CC=cl
66+
CXX=cl
67+
CXXFLAGS="$CXXFLAGS /EHsc"
68+
#
69+
# Sigh, prevents us from overriding it with --libdir= in the config
70+
* line, but we can still override it in the make line.
71+
#
72+
libdir=`cygpath ${WINDIR}/system32`
73+
;;
7474
*-*-darwin*)
75-
AC_MSG_RESULT([MAC])
76-
MAC=1
77-
SCARD_LIB_NAME="PCSC.Framework/PCSC"
78-
PCSC_MSG=yes
79-
PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
80-
PCSC_LIBS="-Wl,-framework,PCSC"
81-
CFLAGS="-DMAC -I/System/Library/Frameworks/Security.framework/Versions/Current/Headers -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
82-
LDFLAGS="-L/System/Library/Frameworks/Security.framework/Versions/Current/Security -arch ppc -arch i386"
83-
CXXFLAGS="-DMAC -I/System/Library/Frameworks/Security.framework/Versions/Current/Headers -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
84-
;;
75+
AC_MSG_RESULT([MAC])
76+
MAC=1
77+
SCARD_LIB_NAME="PCSC.Framework/PCSC"
78+
PCSC_MSG=yes
79+
PCSC_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Versions/Current/Headers"
80+
PCSC_LIBS="-Wl,-framework,PCSC"
81+
CFLAGS="-DMAC -I/System/Library/Frameworks/Security.framework/Versions/Current/Headers -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
82+
LDFLAGS="-L/System/Library/Frameworks/Security.framework/Versions/Current/Security -arch ppc -arch i386"
83+
CXXFLAGS="-DMAC -I/System/Library/Frameworks/Security.framework/Versions/Current/Headers -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386"
84+
;;
8585
*)
86-
AC_MSG_RESULT([UNIX/LINUX])
87-
UNIX=1
86+
AC_MSG_RESULT([UNIX/LINUX])
87+
UNIX=1
8888
# should look it up on the local system
89-
SCARD_LIB_NAME="libpcsclite.so.1"
90-
;;
89+
SCARD_LIB_NAME="libpcsclite.so.1"
90+
;;
9191
esac
9292

9393

9494
# Checks for programs.
9595
AC_PROG_CC
9696
AC_PROG_CXX
97-
AC_PROG_LIBTOOL
9897
AC_PROG_INSTALL
9998
AC_PROG_LN_S
99+
AM_PROG_AR
100+
LT_INIT
100101

101102
# Checks for libraries.
102103
if test $WINDOWS -ne 1; then
@@ -117,8 +118,8 @@ PKG_CHECK_MODULES(PCSC, libpcsclite, true,
117118
])
118119

119120
# Add argument for pk11install
120-
AC_ARG_ENABLE(pk11install,
121-
AC_HELP_STRING([--enable-pk11install], [build an installer for legacy user apps(default=no)]))
121+
AC_ARG_ENABLE(pk11install,
122+
AS_HELP_STRING([--enable-pk11install],[build an installer for legacy user apps(default=no)]))
122123
if test "$enable_pk11install" = "yes" -o "$enable_pk11install" = "true"
123124
then
124125
if test $WINDOWS -ne 1; then
@@ -158,7 +159,7 @@ AC_FUNC_VPRINTF
158159
AC_CHECK_FUNCS([memset strdup strerror])
159160

160161

161-
AC_CONFIG_FILES([
162+
AC_CONFIG_FILES([
162163
Makefile
163164
src/libckyapplet/Makefile
164165
src/libckyapplet/libckyapplet.pc

src/coolkey/Makefile.am

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ libcoolkeypk11_la_LIBADD = @LIBCKYAPPLET@ $(ZLIB_LIBS)
6666
coolkeypk11.sym: coolkeypk11.def
6767
grep -v ';+' $< | grep -v ';-' | sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' | grep -v '^$$'> $@
6868

69-
clean-generic:
70-
rm -f coolkeypk11.sym
69+
CLEANFILES = coolkeypk11.sym
7170

7271
# remove the static and libtool libraries if necessary
7372
install-data-hook:

src/install/Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# Process this file with automake to create Makefile.in
2121

22-
INCLUDES=$(NSS_CFLAGS)
22+
AM_CPPFLAGS=$(NSS_CFLAGS)
2323

2424
bin_PROGRAMS=pk11install
2525

0 commit comments

Comments
 (0)