autoconf magic for compile_et/libcom_err
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10581 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -10,8 +10,6 @@ AM_CFLAGS = $(WFLAGS)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
CP	= cp
 | 
					CP	= cp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COMPILE_ET = $(top_builddir)/lib/com_err/compile_et
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## set build_HEADERZ to headers that should just be installed in build tree
 | 
					## set build_HEADERZ to headers that should just be installed in build tree
 | 
				
			||||||
 | 
					
 | 
				
			||||||
buildinclude = $(top_builddir)/include
 | 
					buildinclude = $(top_builddir)/include
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										58
									
								
								cf/check-compile-et.m4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								cf/check-compile-et.m4
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
				
			|||||||
 | 
					dnl $Id$
 | 
				
			||||||
 | 
					dnl
 | 
				
			||||||
 | 
					dnl CHECK_COMPILE_ET
 | 
				
			||||||
 | 
					AC_DEFUN([CHECK_COMPILE_ET], [
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					krb_cv_compile_et="no"
 | 
				
			||||||
 | 
					if test "${ac_cv_prog_COMPILE_ET}" = "compile_et"; then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dnl We have compile_et.  Now let's see if it supports `prefix' and `index'.
 | 
				
			||||||
 | 
					AC_MSG_CHECKING(compile_et features)
 | 
				
			||||||
 | 
					cat > conftest.et <<'EOF'
 | 
				
			||||||
 | 
					error_table conf
 | 
				
			||||||
 | 
					prefix CONFTEST
 | 
				
			||||||
 | 
					error_code CODE1, "CODE1"
 | 
				
			||||||
 | 
					index 128
 | 
				
			||||||
 | 
					error_code CODE2, "CODE2"
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					if ${ac_cv_prog_COMPILE_ET} conftest.et >/dev/null 2>&1; then
 | 
				
			||||||
 | 
						AC_MSG_RESULT(enough)
 | 
				
			||||||
 | 
					        krb_cv_compile_et="yes"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
						AC_MSG_RESULT(insufficient)
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					rm -fr conftest*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					dnl We don't have compile_et, so we'll need to build our own.
 | 
				
			||||||
 | 
					ac_cv_prog_COMPILE_ET="\$(top_builddir)/lib/com_err/compile_et"
 | 
				
			||||||
 | 
					COMPILE_ET="${ac_cv_prog_COMPILE_ET}"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					AC_CHECK_LIB(com_err, error_message,
 | 
				
			||||||
 | 
					  [krb_cv_com_err="yes"],
 | 
				
			||||||
 | 
					  [krb_cv_com_err="no"])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dnl Only use the system's compile_et or libcom_err if we have them both.
 | 
				
			||||||
 | 
					if test "${krb_cv_compile_et}" = "yes" && \
 | 
				
			||||||
 | 
					   test "${krb_cv_com_err}" = "yes"; then
 | 
				
			||||||
 | 
					    DIR_com_err=""
 | 
				
			||||||
 | 
					    LIB_com_err="-lcom_err"
 | 
				
			||||||
 | 
					    LIB_com_err_a=""
 | 
				
			||||||
 | 
					    LIB_com_err_so=""
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    DIR_com_err="com_err"
 | 
				
			||||||
 | 
					    LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la"
 | 
				
			||||||
 | 
					    LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a"
 | 
				
			||||||
 | 
					    LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					AC_SUBST(COMPILE_ET)
 | 
				
			||||||
 | 
					AC_SUBST(DIR_com_err)
 | 
				
			||||||
 | 
					AC_SUBST(LIB_com_err)
 | 
				
			||||||
 | 
					AC_SUBST(LIB_com_err_a)
 | 
				
			||||||
 | 
					AC_SUBST(LIB_com_err_so)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					])
 | 
				
			||||||
@@ -590,6 +590,9 @@ if test "$krb_cv_sys_streamspty" = yes; then
 | 
				
			|||||||
	AC_DEFINE(STREAMSPTY, 1, [Define if you have streams ptys.])
 | 
						AC_DEFINE(STREAMSPTY, 1, [Define if you have streams ptys.])
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dnl Some operating systems already have com_err and compile_et
 | 
				
			||||||
 | 
					CHECK_COMPILE_ET
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AC_AUTH_MODULES
 | 
					AC_AUTH_MODULES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
dnl This is done by AC_OUTPUT but we need the result here.
 | 
					dnl This is done by AC_OUTPUT but we need the result here.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,5 +12,5 @@ if DCE
 | 
				
			|||||||
dir_dce = kdfs
 | 
					dir_dce = kdfs
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SUBDIRS = @DIR_roken@ vers editline com_err sl asn1 @DIR_des@ krb5 \
 | 
					SUBDIRS = @DIR_roken@ vers editline @DIR_com_err@ sl asn1 @DIR_des@ krb5 \
 | 
				
			||||||
	kafs hdb kadm5 gssapi auth $(dir_45) $(dir_otp) $(dir_dce)
 | 
						kafs hdb kadm5 gssapi auth $(dir_45) $(dir_otp) $(dir_dce)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@ YFLAGS = -d
 | 
				
			|||||||
lib_LTLIBRARIES = libasn1.la
 | 
					lib_LTLIBRARIES = libasn1.la
 | 
				
			||||||
libasn1_la_LDFLAGS = -version-info 5:0:0
 | 
					libasn1_la_LDFLAGS = -version-info 5:0:0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libasn1_la_LIBADD = ../com_err/libcom_err.la
 | 
					libasn1_la_LIBADD = @LIB_com_err@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUILT_SOURCES =			\
 | 
					BUILT_SOURCES =			\
 | 
				
			||||||
	$(gen_files:.x=.c)	\
 | 
						$(gen_files:.x=.c)	\
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,8 +23,8 @@ L = \
 | 
				
			|||||||
	$(top_builddir)/lib/krb5/.libs/libkrb5.a	\
 | 
						$(top_builddir)/lib/krb5/.libs/libkrb5.a	\
 | 
				
			||||||
	$(top_builddir)/lib/asn1/.libs/libasn1.a	\
 | 
						$(top_builddir)/lib/asn1/.libs/libasn1.a	\
 | 
				
			||||||
	$(LIB_krb4)					\
 | 
						$(LIB_krb4)					\
 | 
				
			||||||
	$(LIB_des_a)		\
 | 
						$(LIB_des_a)					\
 | 
				
			||||||
	$(top_builddir)/lib/com_err/.libs/libcom_err.a	\
 | 
						$(LIB_com_err_a)				\
 | 
				
			||||||
	$(top_builddir)/lib/roken/.libs/libroken.a	\
 | 
						$(top_builddir)/lib/roken/.libs/libroken.a	\
 | 
				
			||||||
	$(LIB_getpwnam_r)				\
 | 
						$(LIB_getpwnam_r)				\
 | 
				
			||||||
	-lc
 | 
						-lc
 | 
				
			||||||
@@ -34,8 +34,8 @@ L_shared = \
 | 
				
			|||||||
	$(top_builddir)/lib/krb5/.libs/libkrb5.so	\
 | 
						$(top_builddir)/lib/krb5/.libs/libkrb5.so	\
 | 
				
			||||||
	$(top_builddir)/lib/asn1/.libs/libasn1.so	\
 | 
						$(top_builddir)/lib/asn1/.libs/libasn1.so	\
 | 
				
			||||||
	$(LIB_krb4)					\
 | 
						$(LIB_krb4)					\
 | 
				
			||||||
	$(LIB_des_so)		\
 | 
						$(LIB_des_so)					\
 | 
				
			||||||
	$(top_builddir)/lib/com_err/.libs/libcom_err.so	\
 | 
						$(LIB_com_err_so)				\
 | 
				
			||||||
	$(top_builddir)/lib/roken/.libs/libroken.so	\
 | 
						$(top_builddir)/lib/roken/.libs/libroken.so	\
 | 
				
			||||||
	$(LIB_getpwnam_r)				\
 | 
						$(LIB_getpwnam_r)				\
 | 
				
			||||||
	-lc
 | 
						-lc
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ libsl_la_LDFLAGS = -version-info 1:2:1
 | 
				
			|||||||
libss_la_LDFLAGS = -version-info 1:4:1
 | 
					libss_la_LDFLAGS = -version-info 1:4:1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libsl_la_LIBADD = @LIB_readline@
 | 
					libsl_la_LIBADD = @LIB_readline@
 | 
				
			||||||
libss_la_LIBADD = @LIB_readline@ ../com_err/libcom_err.la
 | 
					libss_la_LIBADD = @LIB_readline@ @LIB_com_err@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
libsl_la_SOURCES = sl_locl.h sl.c $(ES)
 | 
					libsl_la_SOURCES = sl_locl.h sl.c $(ES)
 | 
				
			||||||
libss_la_SOURCES = $(libsl_la_SOURCES) ss.c ss.h
 | 
					libss_la_SOURCES = $(libsl_la_SOURCES) ss.c ss.h
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user