Skip to content

Commit

Permalink
Search for com_err.h in et/com_err.h too
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Apr 22, 2013
1 parent 29d7621 commit ee6f5d6
Show file tree
Hide file tree
Showing 3 changed files with 331 additions and 17 deletions.
313 changes: 305 additions & 8 deletions src/modules/rlm_krb5/configure
Expand Up @@ -2843,7 +2843,7 @@ if test "x$smart_try_dir" != "x"; then
for try in $smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h in $try" >&5
$as_echo_n "checking for krb5.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -I$try"
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand All @@ -2858,7 +2858,7 @@ int a = 1;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-I$try"
smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break
Expand Down Expand Up @@ -2938,7 +2938,7 @@ eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
for try in $smart_include_dir /usr/local/include /opt/include; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h in $try" >&5
$as_echo_n "checking for krb5.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -I$try"
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand All @@ -2953,7 +2953,7 @@ int a = 1;
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-I$try"
smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break
Expand All @@ -2977,7 +2977,304 @@ if test "x$smart_include" != "x"; then
fi

if test "$ac_cv_header_krb5_h" != "yes"; then
fail="$fail krb5.h"
fail="$fail krb5.h"
fi




ac_safe=`echo "com_err.h" | sed 'y%./+-%__pm%'`
old_CFLAGS="$CFLAGS"
smart_include=
smart_include_dir=

if test "x$smart_try_dir" != "x"; then
for try in $smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err.h in $try" >&5
$as_echo_n "checking for com_err.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$old_CFLAGS"
fi

if test "x$smart_include" = "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err.h" >&5
$as_echo_n "checking for com_err.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include=" "
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if test "x$smart_include" = "x"; then


if test "x$LOCATE" != "x"; then
DIRS=
file=com_err.h

for x in `${LOCATE} $file 2>/dev/null`; do
base=`echo $x | sed "s%/${file}%%"`
if test "x$x" = "x$base"; then
continue;
fi

dir=`${DIRNAME} $x 2>/dev/null`
exclude=`echo ${dir} | ${GREP} /home`
if test "x$exclude" != "x"; then
continue
fi

already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi

eval "smart_include_dir=\"\$smart_include_dir $DIRS\""

for try in $smart_include_dir /usr/local/include /opt/include; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err.h in $try" >&5
$as_echo_n "checking for com_err.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$old_CFLAGS"
fi

if test "x$smart_include" != "x"; then
eval "ac_cv_header_$ac_safe=yes"
CFLAGS="$old_CFLAGS $smart_include"
SMART_CFLAGS="$SMART_CFLAGS $smart_include"
fi

if test "$ac_cv_header_com_err_h" != "yes"; then


ac_safe=`echo "et/com_err.h" | sed 'y%./+-%__pm%'`
old_CFLAGS="$CFLAGS"
smart_include=
smart_include_dir=

if test "x$smart_try_dir" != "x"; then
for try in $smart_try_dir; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h in $try" >&5
$as_echo_n "checking for et/com_err.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <et/com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$old_CFLAGS"
fi

if test "x$smart_include" = "x"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5
$as_echo_n "checking for et/com_err.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <et/com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include=" "
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi

if test "x$smart_include" = "x"; then


if test "x$LOCATE" != "x"; then
DIRS=
file=et/com_err.h

for x in `${LOCATE} $file 2>/dev/null`; do
base=`echo $x | sed "s%/${file}%%"`
if test "x$x" = "x$base"; then
continue;
fi

dir=`${DIRNAME} $x 2>/dev/null`
exclude=`echo ${dir} | ${GREP} /home`
if test "x$exclude" != "x"; then
continue
fi

already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
if test "x$already" = "x"; then
DIRS="$DIRS $dir"
fi
done
fi

eval "smart_include_dir=\"\$smart_include_dir $DIRS\""

for try in $smart_include_dir /usr/local/include /opt/include; do
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h in $try" >&5
$as_echo_n "checking for et/com_err.h in $try... " >&6; }
CFLAGS="$old_CFLAGS -isystem $try"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <et/com_err.h>
int
main ()
{
int a = 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :

smart_include="-isystem $try"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
break

else

smart_include=
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }

fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$old_CFLAGS"
fi

if test "x$smart_include" != "x"; then
eval "ac_cv_header_$ac_safe=yes"
CFLAGS="$old_CFLAGS $smart_include"
SMART_CFLAGS="$SMART_CFLAGS $smart_include"
fi

if test "$ac_cv_header_et_com_err_h" != "yes"; then
fail="$fail com_err.h"
else
krb5mod_cflags+="-DET_COMM_ERR "
fi
fi

krb5libcrypto=
Expand Down Expand Up @@ -3667,7 +3964,7 @@ if test "x$smart_lib" != "x"; then
fi

if test "x$ac_cv_lib_krb5_krb5_verify_user_opt" == xyes; then
krb5mod_cflags="-DHEIMDAL_KRB5"
krb5mod_cflags+="-DHEIMDAL_KRB5 "
else


Expand Down Expand Up @@ -4028,8 +4325,8 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"; then :
krb5threadsafe="-DKRB5_IS_THREAD_SAFE"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: krb5 library is not threadsafe" >&5
$as_echo "$as_me: WARNING: krb5 library is not threadsafe" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libkrb5 is not threadsafe" >&5
$as_echo "$as_me: WARNING: libkrb5 is not threadsafe" >&2;}
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
Expand Down

0 comments on commit ee6f5d6

Please sign in to comment.