Просмотр исходного кода

Autodetect build environment for configure for developers.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2058 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 17 лет назад
Родитель
Сommit
1c993d68e6
1 измененных файлов с 24 добавлено и 0 удалено
  1. 24 0
      configure.ac

+ 24 - 0
configure.ac

@@ -14,6 +14,28 @@ AC_CANONICAL_HOST
 
 AC_LANG([C])
 
+dnl Fix default variables - "prefix" variable if not specified
+if test "$prefix" = "NONE"; then
+	prefix="/usr"
+
+	dnl Fix "localstatedir" variable if not specified
+	if test "$localstatedir" = "\${prefix}/var"; then
+		localstatedir="/var"
+	fi
+	dnl Fix "sysconfdir" variable if not specified
+	if test "$sysconfdir" = "\${prefix}/etc"; then
+		sysconfdir="/etc"
+	fi
+	dnl Fix "libdir" variable if not specified
+	if test "$libdir" = "\${exec_prefix}/lib"; then
+		if test -e /usr/lib64; then
+			libdir="/usr/lib64"
+		else
+			libdir="/usr/lib"
+		fi
+	fi
+fi
+
 # Checks for programs.
 
 # check stolen from gnulib/m4/gnu-make.m4
@@ -21,6 +43,8 @@ if ! ${MAKE-make} --version /cannot/make/this >/dev/null 2>&1; then
 	AC_MSG_ERROR([you don't seem to have GNU make; it is required])
 fi
 
+sinclude(coroysync-default.m4)
+
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_LN_S