~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to acinclude.m4

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2010-05-04 11:15:49 UTC
  • mfrom: (1.3.1 upstream)
  • mto: (20.3.1 squeeze) (21.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20100504111549-1apjh2g5sndki4te
Tags: upstream-3.1.3
ImportĀ upstreamĀ versionĀ 3.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
dnl
70
70
dnl Test whether -fhuge-objects is available with this c++ compiler. gcc-29.5 series compilers need this on some platform with large objects.
71
71
dnl
 
72
HUGE_OBJECT_FLAG=""
72
73
AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[
 
74
 if test "$GCC" = "yes"; then
73
75
  AC_MSG_CHECKING([whether compiler accepts -fhuge-objects])
74
76
  AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[
75
 
    ac_cv_test_checkforhugeobjects=`echo "int foo;" > conftest.cc
76
 
${CXX} -Werror -fhuge-objects -c conftest.cc 2>/dev/null
 
77
    ac_cv_test_checkforhugeobjects=`echo "int main(int argc, char **argv) { int foo; }" > conftest.cc
 
78
${CXX} -Werror -fhuge-objects -o conftest.bin conftest.cc 2>/dev/null
77
79
res=$?
78
80
rm -f conftest.*
79
81
echo yes
89
91
  if test "X${ac_cv_test_checkforhugeobjects}" != Xno
90
92
  then
91
93
    HUGE_OBJECT_FLAG="-fhuge-objects"
92
 
  else
93
 
    HUGE_OBJECT_FLAG=""
94
94
  fi
 
95
 fi #gcc
95
96
]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS
 
97
 
 
98
 
 
99
dnl ===========================================================================
 
100
dnl              http://autoconf-archive.cryp.to/ax_with_prog.html
 
101
dnl ===========================================================================
 
102
dnl
 
103
dnl SYNOPSIS
 
104
dnl
 
105
dnl   AX_WITH_PROG([VARIABLE],[program],[VALUE-IF-NOT-FOUND],[PATH])
 
106
dnl
 
107
dnl DESCRIPTION
 
108
dnl
 
109
dnl   Locates an installed program binary, placing the result in the precious
 
110
dnl   variable VARIABLE. Accepts a present VARIABLE, then --with-program, and
 
111
dnl   failing that searches for program in the given path (which defaults to
 
112
dnl   the system path). If program is found, VARIABLE is set to the full path
 
113
dnl   of the binary; if it is not found VARIABLE is set to VALUE-IF-NOT-FOUND
 
114
dnl   if provided, unchanged otherwise.
 
115
dnl
 
116
dnl   A typical example could be the following one:
 
117
dnl
 
118
dnl         AX_WITH_PROG(PERL,perl)
 
119
dnl
 
120
dnl   NOTE: This macro is based upon the original AX_WITH_PYTHON macro from
 
121
dnl   Dustin J. Mitchell <dustin@cs.uchicago.edu>.
 
122
dnl
 
123
dnl LAST MODIFICATION
 
124
dnl
 
125
dnl   2008-05-05
 
126
dnl
 
127
dnl COPYLEFT
 
128
dnl
 
129
dnl   Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
 
130
dnl   Copyright (c) 2008 Dustin J. Mitchell <dustin@cs.uchicago.edu>
 
131
dnl
 
132
dnl   Copying and distribution of this file, with or without modification, are
 
133
dnl   permitted in any medium without royalty provided the copyright notice
 
134
dnl   and this notice are preserved.
 
135
dnl
 
136
AC_DEFUN([AX_WITH_PROG],[
 
137
    AC_PREREQ([2.61])
 
138
 
 
139
    pushdef([VARIABLE],$1)
 
140
    pushdef([EXECUTABLE],$2)
 
141
    pushdef([VALUE_IF_NOT_FOUND],$3)
 
142
    pushdef([PATH_PROG],$4)
 
143
 
 
144
    AC_ARG_VAR(VARIABLE,Absolute path to EXECUTABLE executable)
 
145
 
 
146
    AS_IF(test -z "$VARIABLE",[
 
147
        AC_MSG_CHECKING(whether EXECUTABLE executable path has been provided)
 
148
        AC_ARG_WITH(EXECUTABLE,AS_HELP_STRING([--with-EXECUTABLE=[[[[PATH]]]]],absolute path to EXECUTABLE executable), [
 
149
            AS_IF([test "$withval" != "yes"],[
 
150
                VARIABLE="$withval"
 
151
                AC_MSG_RESULT($VARIABLE)
 
152
            ],[
 
153
                VARIABLE=""
 
154
                AC_MSG_RESULT([no])
 
155
            ])
 
156
        ],[
 
157
            AC_MSG_RESULT([no])
 
158
        ])
 
159
 
 
160
        AS_IF(test -z "$VARIABLE",[
 
161
            AC_PATH_PROG([]VARIABLE[],[]EXECUTABLE[],[]VALUE_IF_NOT_FOUND[],[]PATH_PROG[])
 
162
        ])
 
163
    ])
 
164
 
 
165
    popdef([PATH_PROG])
 
166
    popdef([VALUE_IF_NOT_FOUND])
 
167
    popdef([EXECUTABLE])
 
168
    popdef([VARIABLE])
 
169
])