mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r7425: configure check to see if a compiler can handle negative enum values
if the compiler doesn't support it we pass --uint-enums to pidl
metze
(This used to be commit c52703c0a8
)
This commit is contained in:
parent
0f247a39a6
commit
1b3471ed0c
@ -67,6 +67,20 @@ if test x"$samba_cv_immediate_structures" = x"yes"; then
|
||||
AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures])
|
||||
fi
|
||||
|
||||
############################################
|
||||
# check if the compiler can handle negative enum values
|
||||
AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
|
||||
AC_TRY_COMPILE([
|
||||
#include <stdio.h>],
|
||||
[
|
||||
enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
|
||||
],
|
||||
SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)])
|
||||
if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
|
||||
AC_MSG_WARN([using --unit-enums for pidl])
|
||||
PIDL_ARGS="$PIDL_ARGS --uint-enums"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for test routines])
|
||||
AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
|
||||
AC_MSG_RESULT(yes),
|
||||
|
@ -13,3 +13,6 @@ fi
|
||||
if test x"$debug" = x"yes";then
|
||||
PERL="$PERL -W"
|
||||
fi
|
||||
|
||||
PIDL_ARGS=""
|
||||
AC_SUBST(PIDL_ARGS)
|
||||
|
@ -130,10 +130,10 @@ sub _prepare_IDL($)
|
||||
|
||||
return << '__EOD__';
|
||||
idl_full: build/pidl/idl.pm
|
||||
CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh FULL
|
||||
CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh FULL @PIDL_ARGS@
|
||||
|
||||
idl: build/pidl/idl.pm
|
||||
@CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh PARTIAL
|
||||
@CPP="@CPP@" PERL="$(PERL)" script/build_idl.sh PARTIAL @PIDL_ARGS@
|
||||
|
||||
build/pidl/idl.pm: build/pidl/idl.yp
|
||||
-yapp -s build/pidl/idl.yp
|
||||
|
@ -1,10 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
FULLBUILD=$1
|
||||
shift 1
|
||||
PIDL_EXTRA_ARGS="$*"
|
||||
|
||||
[ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1
|
||||
|
||||
PIDL="$PERL ./build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --server --client --dcom-proxy --com-header --swig --odl"
|
||||
PIDL="$PERL ./build/pidl/pidl.pl --output librpc/gen_ndr/ndr_ --parse --header --parser --server --client --dcom-proxy --com-header --swig --odl $PIDL_EXTRA_ARGS"
|
||||
|
||||
if [ x$FULLBUILD = xFULL ]; then
|
||||
echo Rebuilding all idl files in librpc/idl
|
||||
|
Loading…
Reference in New Issue
Block a user