X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=configure.ac;h=0dc4e4bd5ab98e695f6f94d5bfc2038fe7c61090;hp=99b74df27d41eaaa4afb77b3544cc5bf03e0501b;hb=199f218bf431b77c12a728f7072bed1553a0f0af;hpb=aba59fd3555ac8b38ae554a729970afd80e05404 diff --git a/configure.ac b/configure.ac index 99b74df..0dc4e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,17 @@ AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number]) AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number]) AC_DEFINE([PACKAGE_VERSION_EXTRA],["libguestfs_extra"],[Extra version string]) +dnl Die if the user tries to configure as root, see: +dnl https://www.redhat.com/archives/libguestfs/2010-April/msg00098.html +AC_MSG_CHECKING([if you are trying to configure as root]) +AS_IF([test "`id -u`" = 0 ],[ + AC_MSG_RESULT([yes]) + AC_MSG_FAILURE([Don't run './configure' or 'make' as root.]) + ],[ + AC_MSG_RESULT([no]) + ]) + +dnl Early gnulib initialization. gl_EARLY gl_INIT