mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix kvm test. Uninstall
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6b1d2c2047
commit
4606abb715
9 changed files with 76 additions and 26 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2004-06-14 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Fix kvm test. Define HAVE_KVM_ENV
|
||||
* Headers/Additions/GNUstepBase/config.h.in, configure: Regenerate
|
||||
* Source/NSProcessInfo: Use it.
|
||||
|
||||
* Makefile.postamble (after-uninstall): Remove base.make
|
||||
* Source/CompatibilityHeaders.make (before-uninstall): Remove headers
|
||||
* Tools/Makefile.postamble (before-uninstall): Remove dtds, man files.
|
||||
|
||||
2004-06-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDictionary.m: MacOS-X compatibility fix for keyed encoding
|
||||
|
|
|
@ -20,6 +20,11 @@
|
|||
base library, for documentation on additional classes, see the
|
||||
BaseAdditions documentation package.
|
||||
</p>
|
||||
<p>
|
||||
Read the
|
||||
<uref url="../ReleaseNotes/ReleaseNotes.html">Release Notes</uref>
|
||||
for the current release.
|
||||
</p>
|
||||
<index scope="project" type="title" />
|
||||
<section>
|
||||
<heading>Compatibility</heading>
|
||||
|
|
|
@ -79,6 +79,9 @@
|
|||
/* Define to 1 if you have the `killpg' function. */
|
||||
#undef HAVE_KILLPG
|
||||
|
||||
/* Define if you can access the kernel via kvm_open */
|
||||
#undef HAVE_KVM_ENV
|
||||
|
||||
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||
#undef HAVE_LANGINFO_CODESET
|
||||
|
||||
|
@ -400,9 +403,6 @@
|
|||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define if you can access the kernel via kvm_open */
|
||||
#undef have_kvm_env
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
#undef inline
|
||||
|
|
|
@ -56,8 +56,8 @@ before-install:: $(INSTALL_ROOT_DIR)$(GNUSTEP_MAKEFILES)/Additional
|
|||
# before-uninstall::
|
||||
|
||||
# Things to do after uninstalling
|
||||
# after-uninstall::
|
||||
|
||||
after-uninstall::
|
||||
$(ECHO_NOTHING)rm -f $(INSTALL_ROOT_DIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
|
||||
# Things to do before cleaning
|
||||
# before-clean::
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ after-install::
|
|||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
|
||||
|
@ -43,7 +43,7 @@ after-install::
|
|||
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
for I in $$LIST ; do \
|
||||
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
echo "#include <$$NEW_DIR/$$I>" ) \
|
||||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I;\
|
||||
done
|
||||
|
||||
|
@ -56,3 +56,25 @@ after-install::
|
|||
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done
|
||||
|
||||
|
||||
before-uninstall::
|
||||
-@OLD_DIR=Foundation; NEW_DIR=GNUstepBase; \
|
||||
LIST="GSXML.h GSMime.h" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done;
|
||||
|
||||
-@OLD_DIR=gnustep/unicode; NEW_DIR=GNUstepBase/unicode; \
|
||||
LIST="caseconv.h cop.h cyrillic.h latin2.h decomp.h nextstep.h" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done; \
|
||||
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR
|
||||
|
||||
-@OLD_DIR=gnustep/base; NEW_DIR=GNUstepBase; \
|
||||
LIST="$(GNU_HEADERS)" ;\
|
||||
for I in $$LIST ; do \
|
||||
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
|
||||
done; \
|
||||
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR; \
|
||||
rmdir $(GNUSTEP_HEADERS)/gnustep
|
||||
|
|
|
@ -71,12 +71,12 @@
|
|||
#include <sys/fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIBKVM
|
||||
#ifdef HAVE_KVM_ENV
|
||||
#include <kvm.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif /* HAVE_LIBKVM */
|
||||
#endif /* HAVE_KVM_ENV */
|
||||
|
||||
#include "GSConfig.h"
|
||||
#include "Foundation/NSString.h"
|
||||
|
@ -315,7 +315,7 @@ _gnu_process_args(int argc, char *argv[], char *env[])
|
|||
IF_NO_GC(RELEASE(arp));
|
||||
}
|
||||
|
||||
#if !GS_FAKE_MAIN && ((defined(HAVE_PROCFS) || defined(HAVE_LIBKVM)) && (defined(HAVE_LOAD_METHOD)))
|
||||
#if !GS_FAKE_MAIN && ((defined(HAVE_PROCFS) || defined(HAVE_KVM_ENV)) && (defined(HAVE_LOAD_METHOD)))
|
||||
/*
|
||||
* We have to save program arguments and environment before main () is
|
||||
* executed, because main () could modify their values before we get a
|
||||
|
@ -333,7 +333,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
*/
|
||||
+ (void) load
|
||||
{
|
||||
#ifdef HAVE_LIBKVM
|
||||
#ifdef HAVE_KVM_ENV
|
||||
/*
|
||||
* Use the kvm library to open the kernel and read the environment and
|
||||
* arguments. As we are not running as root we cannot open the memory
|
||||
|
@ -410,7 +410,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
_gnu_noobjc_argv[i] = NULL;
|
||||
|
||||
return;
|
||||
#else /* !HAVE_LIBKVM (i.e. HAVE_PROCFS). */
|
||||
#else /* !HAVE_KVM_ENV (i.e. HAVE_PROCFS). */
|
||||
/*
|
||||
* Now we have the problem of reading program arguments and
|
||||
* environment. We take the environment from extern char **environ, and
|
||||
|
@ -592,7 +592,7 @@ static char **_gnu_noobjc_env = NULL;
|
|||
*/
|
||||
abort();
|
||||
#endif /* HAVE_PROGRAM_INVOCATION_NAME */
|
||||
#endif /* !HAVE_LIBKVM (e.g. HAVE_PROCFS) */
|
||||
#endif /* !HAVE_KVM_ENV (e.g. HAVE_PROCFS) */
|
||||
malloc_error:
|
||||
fprintf(stderr, "malloc() error when starting gnustep-base.\n");
|
||||
fprintf(stderr, "Free some memory and then re-run the program.\n");
|
||||
|
@ -633,7 +633,7 @@ _gnu_noobjc_free_vars(void)
|
|||
_gnu_noobjc_free_vars();
|
||||
}
|
||||
}
|
||||
#else /*! HAVE_PROCFS !HAVE_LOAD_METHOD !HAVE_LIBKVM */
|
||||
#else /*! HAVE_PROCFS !HAVE_LOAD_METHOD !HAVE_KVM_ENV */
|
||||
|
||||
#ifdef __MINGW__
|
||||
/* For WindowsAPI Library, we know the global variables (argc, etc) */
|
||||
|
|
|
@ -74,7 +74,20 @@ after-install::
|
|||
$(END_ECHO)
|
||||
|
||||
# Things to do before uninstalling
|
||||
# before-uninstall::
|
||||
before-uninstall::
|
||||
for file in $(DTD_FILES); do \
|
||||
rm -f $(dtddir)/$$file; \
|
||||
done
|
||||
-rmdir $(dtddir)
|
||||
for file in $(MAN1_PAGES); do \
|
||||
rm -f $(GNUSTEP_DOCUMENTATION_MAN)/man1/$$file.gz; \
|
||||
done;
|
||||
-rmdir$(GNUSTEP_DOCUMENTATION_MAN)/man1;
|
||||
for file in $(MAN8_PAGES); do \
|
||||
rm -f $(GNUSTEP_DOCUMENTATION_MAN)/man8/$$file.gz; \
|
||||
done;
|
||||
-rmdir $(GNUSTEP_DOCUMENTATION_MAN)/man8;
|
||||
-rmdir $(GNUSTEP_DOCUMENTATION_MAN);
|
||||
|
||||
# Things to do after uninstalling
|
||||
# after-uninstall::
|
||||
|
|
14
configure
vendored
14
configure
vendored
|
@ -12215,20 +12215,20 @@ have_kvm_env=0
|
|||
fi
|
||||
rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define have_kvm_env $have_kvm_env
|
||||
_ACEOF
|
||||
|
||||
if test $have_kvm_env = 1; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_KVM_ENV 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
# Reset LIBS since we don't need kvm
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
# Reset LIBS since we don't need kvm
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
@ -833,15 +833,15 @@ if test "$ac_cv_lib_kvm_kvm_getenvv" = yes; then
|
|||
have_kvm_env=1,
|
||||
have_kvm_env=0,
|
||||
have_kvm_env=0)
|
||||
AC_DEFINE_UNQUOTED(have_kvm_env, $have_kvm_env,
|
||||
[Define if you can access the kernel via kvm_open])
|
||||
if test $have_kvm_env = 1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_KVM_ENV, 1,
|
||||
[Define if you can access the kernel via kvm_open])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
# Reset LIBS since we don't need kvm
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
# Reset LIBS since we don't need kvm
|
||||
LIBS="$save_LIBS"
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue