mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
utempter: complete the implementation
Liang Chang added utempter support to the dtterm widget in pre-autoconf CDE. While the code itself was merged, it was still not "turned on" for autoconf builds. This commit completes the implementation allowing dtterm on Linux and the BSDs to be installed without having to be setuid root -- as long as the libutempter headers and libraries are installed.
This commit is contained in:
parent
67ef980644
commit
2730367844
4 changed files with 26 additions and 4 deletions
|
@ -377,7 +377,7 @@ fi
|
||||||
|
|
||||||
dnl headers
|
dnl headers
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([locale.h security/pam_appl.h])
|
AC_CHECK_HEADERS([locale.h security/pam_appl.h utempter.h])
|
||||||
|
|
||||||
dnl libraries
|
dnl libraries
|
||||||
AC_CHECK_LIB(m, cosf)
|
AC_CHECK_LIB(m, cosf)
|
||||||
|
@ -451,6 +451,13 @@ AC_CHECK_LIB(pam, pam_start,
|
||||||
|
|
||||||
AM_CONDITIONAL([HAS_PAM_LIBRARY], [test "x$ac_cv_lib_pam_pam_start" = "xyes"])
|
AM_CONDITIONAL([HAS_PAM_LIBRARY], [test "x$ac_cv_lib_pam_pam_start" = "xyes"])
|
||||||
|
|
||||||
|
dnl figure out utempter support
|
||||||
|
|
||||||
|
AC_CHECK_LIB(utempter, utempter_add_record,
|
||||||
|
[SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DHAS_UTEMPTER_LIBRARY"])
|
||||||
|
|
||||||
|
AM_CONDITIONAL([HAS_UTEMPTER_LIBRARY], [test "x$ac_cv_lib_utempter_utempter_add_record" = "xyes"])
|
||||||
|
|
||||||
dnl Figure out TCL
|
dnl Figure out TCL
|
||||||
|
|
||||||
SC_PATH_TCLCONFIG
|
SC_PATH_TCLCONFIG
|
||||||
|
|
|
@ -21,4 +21,8 @@ if SOLARIS
|
||||||
libDtTerm_la_LIBADD += -ldl -lgen
|
libDtTerm_la_LIBADD += -ldl -lgen
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAS_UTEMPTER_LIBRARY
|
||||||
|
libDtTerm_la_LIBADD += -lutempter
|
||||||
|
endif
|
||||||
|
|
||||||
libDtTerm_la_LDFLAGS = -version-info 2:1:0
|
libDtTerm_la_LDFLAGS = -version-info 2:1:0
|
||||||
|
|
|
@ -42,9 +42,14 @@ libTermPrim_la_SOURCES += TermPrimGetPty-svr4.c
|
||||||
AM_CPPFLAGS += -DSUN_ARCHITECTURE
|
AM_CPPFLAGS += -DSUN_ARCHITECTURE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# uses CSRG_BASED...
|
# Use the posix pts api, like linux
|
||||||
if BSD
|
if BSD
|
||||||
libTermPrim_la_SOURCES += TermPrimGetPty-bsd.c
|
libTermPrim_la_SOURCES += TermPrimGetPty-pts.c
|
||||||
|
# uses CSRG_BASED global define
|
||||||
|
endif
|
||||||
|
|
||||||
|
if FREEBSD
|
||||||
|
AM_CPPFLAGS += -DFREEBSD_ARCHITECTURE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if OPENBSD
|
if OPENBSD
|
||||||
|
@ -52,6 +57,6 @@ AM_CPPFLAGS += -DOPENBSD_ARCHITECTURE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if LINUX
|
if LINUX
|
||||||
libTermPrim_la_SOURCES += TermPrimGetPty-svr4.c
|
libTermPrim_la_SOURCES += TermPrimGetPty-pts.c
|
||||||
AM_CPPFLAGS += -DLINUX_ARCHITECTURE
|
AM_CPPFLAGS += -DLINUX_ARCHITECTURE
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -8,6 +8,10 @@ if BSD
|
||||||
dtterm_LDADD += -lutil
|
dtterm_LDADD += -lutil
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAS_UTEMPTER_LIBRARY
|
||||||
|
dtterm_LDADD += -lutempter
|
||||||
|
endif
|
||||||
|
|
||||||
dtterm_CFLAGS = -I$(top_builddir)/lib/DtTerm/TermPrim \
|
dtterm_CFLAGS = -I$(top_builddir)/lib/DtTerm/TermPrim \
|
||||||
-I$(top_builddir)/lib/DtTerm/Term \
|
-I$(top_builddir)/lib/DtTerm/Term \
|
||||||
-I$(top_builddir)/lib/DtTerm/TermView \
|
-I$(top_builddir)/lib/DtTerm/TermView \
|
||||||
|
@ -45,5 +49,7 @@ dtterm.ti: terminfoChecklist
|
||||||
|
|
||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
chown root $(DESTDIR)$(bindir)/dtterm
|
chown root $(DESTDIR)$(bindir)/dtterm
|
||||||
|
if !HAS_UTEMPTER_LIBRARY
|
||||||
chmod 4755 $(DESTDIR)$(bindir)/dtterm
|
chmod 4755 $(DESTDIR)$(bindir)/dtterm
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue