For each axis, compute whether the intervals spanned by the two boxes are...
-1: overlapped (minA < maxB & maxA > minB)
0: adjacent (minA == maxB or minB == maxA)
+1: separated (minA > maxB or minB > maxA)
Return the greatest result you found on any axis.
(ie. The boxes are "overlapping" only if their intervals overlap on every axis. Being "adjacent" on any axis trumps overlapped, and "separated" trumps all)
The numbers I used to label the cases are arbitrary - I picked -1,0,1 to represent the sign of the distance between the boxes: positive if separated, negative if overlapped, and exactly zero if just in contact.