Lines 20-41
Link Here
|
20 |
# |
20 |
# |
21 |
# Configure paths for SVRCORE |
21 |
# Configure paths for SVRCORE |
22 |
|
22 |
|
23 |
AC_CHECKING(for svrcore) |
23 |
AC_CHECKING(for SVRCORE) |
24 |
|
24 |
|
25 |
AC_MSG_CHECKING(for --with-svrcore) |
25 |
AC_MSG_CHECKING(for --with-svrcore) |
26 |
AC_ARG_WITH(svrcore, |
26 |
AC_ARG_WITH(svrcore, |
27 |
[[ --with-svrcore[=PATH] Use system installed svrcore - optional path for svrcore]], |
27 |
AS_HELP_STRING([--with-svrcore@<:@=PATH@:>@],[Use system installed SVRCORE - optional path for SVRCORE]), |
28 |
dnl = Look in the standard system locations |
28 |
dnl = Look in the standard system locations |
29 |
[ |
29 |
[ |
30 |
if test "$withval" = "yes"; then |
30 |
if test "$withval" = "yes"; then |
31 |
AC_MSG_RESULT(yes) |
31 |
AC_MSG_RESULT(yes) |
32 |
|
32 |
|
33 |
dnl = Check for svrcore.h in the normal locations |
33 |
elif test "$withval" = "no"; then |
34 |
if test -f /usr/include/svrcore.h; then |
34 |
AC_MSG_RESULT(no) |
35 |
svrcore_inc="-I/usr/include" |
35 |
AC_MSG_ERROR([SVRCORE is required.]) |
36 |
else |
|
|
37 |
AC_MSG_ERROR(svrcore.h not found) |
38 |
fi |
39 |
|
36 |
|
40 |
dnl = Check the user provided location |
37 |
dnl = Check the user provided location |
41 |
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then |
38 |
elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then |
Lines 50-63
AC_ARG_WITH(svrcore,
Link Here
|
50 |
svrcore_lib="-L$withval/lib" |
47 |
svrcore_lib="-L$withval/lib" |
51 |
else |
48 |
else |
52 |
AC_MSG_RESULT(yes) |
49 |
AC_MSG_RESULT(yes) |
53 |
AC_MSG_ERROR([svrcore not found in $withval]) |
50 |
AC_MSG_ERROR([SVRCORE not found in $withval]) |
54 |
fi |
51 |
fi |
55 |
], |
52 |
], |
56 |
AC_MSG_RESULT(no)) |
53 |
AC_MSG_RESULT(yes)) |
57 |
|
54 |
|
58 |
AC_MSG_CHECKING(for --with-svrcore-inc) |
55 |
AC_MSG_CHECKING(for --with-svrcore-inc) |
59 |
AC_ARG_WITH(svrcore-inc, |
56 |
AC_ARG_WITH(svrcore-inc, |
60 |
[[ --with-svrcore-inc=PATH SVRCORE include file directory]], |
57 |
AS_HELP_STRING([--with-svrcore-inc=PATH],[SVRCORE include file directory]), |
61 |
[ |
58 |
[ |
62 |
if test -f "$withval"/svrcore.h; then |
59 |
if test -f "$withval"/svrcore.h; then |
63 |
AC_MSG_RESULT([using $withval]) |
60 |
AC_MSG_RESULT([using $withval]) |
Lines 71-77
AC_ARG_WITH(svrcore-inc,
Link Here
|
71 |
|
68 |
|
72 |
AC_MSG_CHECKING(for --with-svrcore-lib) |
69 |
AC_MSG_CHECKING(for --with-svrcore-lib) |
73 |
AC_ARG_WITH(svrcore-lib, |
70 |
AC_ARG_WITH(svrcore-lib, |
74 |
[[ --with-svrcore-lib=PATH SVRCORE library directory]], |
71 |
AS_HELP_STRING([--with-svrcore-lib=PATH],[SVRCORE library directory]), |
75 |
[ |
72 |
[ |
76 |
if test -d "$withval"; then |
73 |
if test -d "$withval"; then |
77 |
AC_MSG_RESULT([using $withval]) |
74 |
AC_MSG_RESULT([using $withval]) |
Lines 86-92
AC_ARG_WITH(svrcore-lib,
Link Here
|
86 |
dnl svrcore not given - look for pkg-config |
83 |
dnl svrcore not given - look for pkg-config |
87 |
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then |
84 |
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then |
88 |
AC_PATH_PROG(PKG_CONFIG, pkg-config) |
85 |
AC_PATH_PROG(PKG_CONFIG, pkg-config) |
89 |
AC_MSG_CHECKING(for svrcore with pkg-config) |
86 |
AC_MSG_CHECKING(for SVRCORE with pkg-config) |
90 |
if test -n "$PKG_CONFIG"; then |
87 |
if test -n "$PKG_CONFIG"; then |
91 |
if $PKG_CONFIG --exists svrcore; then |
88 |
if $PKG_CONFIG --exists svrcore; then |
92 |
svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore` |
89 |
svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore` |
Lines 97-114
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then
Link Here
|
97 |
fi |
94 |
fi |
98 |
|
95 |
|
99 |
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then |
96 |
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then |
100 |
dnl just see if svrcore is already a system library |
97 |
dnl just see if SVRCORE is already a system library |
101 |
AC_CHECK_LIB([svrcore], [SVRCORE_GetRegisteredPinObj], [havesvrcore=1], |
98 |
AC_CHECK_LIB([svrcore], [SVRCORE_GetRegisteredPinObj], [havesvrcore=1], |
102 |
[], [$nss_inc $nspr_inc $nss_lib -lnss3 -lsoftokn3 $nspr_lib -lplds4 -lplc4 -lnspr4]) |
99 |
[], [$nss_inc $nspr_inc $nss_lib -lnss3 -lsoftokn3 $nspr_lib -lplds4 -lplc4 -lnspr4]) |
103 |
if test -n "$havesvrcore" ; then |
100 |
if test -n "$havesvrcore" ; then |
104 |
dnl just see if svrcore is already a system header file |
101 |
dnl just see if SVRCORE is already a system header file |
105 |
save_cppflags="$CPPFLAGS" |
102 |
save_cppflags="$CPPFLAGS" |
106 |
CPPFLAGS="$nss_inc $nspr_inc" |
103 |
CPPFLAGS="$nss_inc $nspr_inc" |
107 |
AC_CHECK_HEADER([svrcore.h], [havesvrcore=1], [havesvrcore=]) |
104 |
AC_CHECK_HEADER([svrcore.h], [havesvrcore=1], [havesvrcore=]) |
108 |
CPPFLAGS="$save_cppflags" |
105 |
CPPFLAGS="$save_cppflags" |
109 |
fi |
106 |
fi |
110 |
dnl for svrcore to be present, both the library and the header must exist |
107 |
dnl for SVRCORE to be present, both the library and the header must exist |
111 |
if test -z "$havesvrcore" ; then |
108 |
if test -z "$havesvrcore" ; then |
112 |
AC_MSG_ERROR([svrcore not found, specify with --with-svrcore.]) |
109 |
AC_MSG_ERROR([SVRCORE not found, specify with --with-svrcore.]) |
|
|
110 |
fi |
111 |
fi |
112 |
|
113 |
dnl = Check for svrcore.h in the normal locations |
114 |
if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then |
115 |
if test -f /usr/include/svrcore.h; then |
116 |
svrcore_inc="-I/usr/include" |
117 |
svrcore_lib="-L/usr/lib" |
118 |
else |
119 |
AC_MSG_ERROR([SVRCORE not found, specify with --with-svrcore.]) |
113 |
fi |
120 |
fi |
114 |
fi |
121 |
fi |
115 |
- |
|
|