OSDN Git Service

move up cunit workaround for ubuntu/debian
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2015 17:38:31 +0000 (13:38 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2015 17:38:31 +0000 (13:38 -0400)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
configure.ac

index f2e1150..41bf039 100644 (file)
@@ -361,25 +361,23 @@ fi
 
 # Detect cunit library
 PKG_CHECK_MODULES([CUNIT], [cunit >= 2.1], [have_cunit=yes], [have_cunit=no])
+# If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
+# do this because Debian (Ubuntu) lacks pkg-config file for cunit.
+if test "x${have_cunit}" = "xno"; then
+       AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
+       if test "x${have_cunit}" = "xyes"; then
+               CUNIT_LIBS="-lcunit"
+               CUNIT_CFLAGS=""
+               AC_SUBST([CUNIT_LIBS])
+               AC_SUBST([CUNIT_CFLAGS])
+       fi
+fi
 AM_CONDITIONAL(HAVE_CUNIT, [test "x$have_cunit" != "xno"])
 
 AM_CONDITIONAL(HAVE_AMDGPU, [test "x$AMDGPU" = xyes])
 if test "x$AMDGPU" = xyes; then
        AC_DEFINE(HAVE_AMDGPU, 1, [Have amdgpu support])
 
-
-       # If pkg-config does not find cunit, check it using AC_CHECK_LIB.  We
-       # do this because Debian (Ubuntu) lacks pkg-config file for cunit.
-       if test "x${have_cunit}" = "xno"; then
-               AC_CHECK_LIB([cunit], [CU_initialize_registry], [have_cunit=yes], [have_cunit=no])
-               if test "x${have_cunit}" = "xyes"; then
-                       CUNIT_LIBS="-lcunit"
-                       CUNIT_CFLAGS=""
-                       AC_SUBST([CUNIT_LIBS])
-                       AC_SUBST([CUNIT_CFLAGS])
-               fi
-       fi
-
        AC_DEFINE(HAVE_CUNIT, [test "x$have_cunit" != "xno"], [Enable CUNIT Have amdgpu support])
 
        if test "x$have_cunit" = "xno"; then