VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/nsprpub/config/nspr.m4@ 2426

Last change on this file since 2426 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1# -*- tab-width: 4; -*-
2# Configure paths for NSPR
3# Public domain - Chris Seawood <cls@seawood.org> 2001-04-05
4# Based upon gtk.m4 (also PD) by Owen Taylor
5
6dnl AM_PATH_NSPR([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
7dnl Test for NSPR, and define NSPR_CFLAGS and NSPR_LIBS
8AC_DEFUN(AM_PATH_NSPR,
9[dnl
10
11AC_ARG_WITH(nspr-prefix,
12 [ --with-nspr-prefix=PFX Prefix where NSPR is installed],
13 nspr_config_prefix="$withval",
14 nspr_config_prefix="")
15
16AC_ARG_WITH(nspr-exec-prefix,
17 [ --with-nspr-exec-prefix=PFX
18 Exec prefix where NSPR is installed],
19 nspr_config_exec_prefix="$withval",
20 nspr_config_exec_prefix="")
21
22 if test -n "$nspr_config_exec_prefix"; then
23 nspr_config_args="$nspr_config_args --exec-prefix=$nspr_config_exec_prefix"
24 if test -z "$NSPR_CONFIG"; then
25 NSPR_CONFIG=$nspr_config_exec_prefix/bin/nspr-config
26 fi
27 fi
28 if test -n "$nspr_config_prefix"; then
29 nspr_config_args="$nspr_config_args --prefix=$nspr_config_prefix"
30 if test -z "$NSPR_CONFIG"; then
31 NSPR_CONFIG=$nspr_config_prefix/bin/nspr-config
32 fi
33 fi
34
35 unset ac_cv_path_NSPR_CONFIG
36 AC_PATH_PROG(NSPR_CONFIG, nspr-config, no)
37 min_nspr_version=ifelse([$1], ,4.0.0,$1)
38 AC_MSG_CHECKING(for NSPR - version >= $min_nspr_version (skipping))
39
40 no_nspr=""
41 if test "$NSPR_CONFIG" = "no"; then
42 no_nspr="yes"
43 else
44 NSPR_CFLAGS=`$NSPR_CONFIG $nspr_config_args --cflags`
45 NSPR_LIBS=`$NSPR_CONFIG $nspr_config_args --libs`
46
47 dnl Skip version check for now
48 nspr_config_major_version=`$NSPR_CONFIG $nspr_config_args --version | \
49 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
50 nspr_config_minor_version=`$NSPR_CONFIG $nspr_config_args --version | \
51 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
52 nspr_config_micro_version=`$NSPR_CONFIG $nspr_config_args --version | \
53 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
54 fi
55
56 if test -z "$no_nspr"; then
57 AC_MSG_RESULT(yes)
58 ifelse([$2], , :, [$2])
59 else
60 AC_MSG_RESULT(no)
61 fi
62
63
64 AC_SUBST(NSPR_CFLAGS)
65 AC_SUBST(NSPR_LIBS)
66
67])
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette