llvm.org GIT mirror llvm / e1e7310
Find xdot or xdot.py. Ubuntu installs this as xdot, so finding xdot.py would fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185860 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 7 years ago
6 changed file(s) with 42 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
11991199 AC_DEFINE_UNQUOTED([LLVM_PATH_DOTTY],"$DOTTY${EXEEXT}",
12001200 [Define to path to dotty program if found or 'echo dotty' otherwise])
12011201 fi
1202 AC_PATH_PROG(XDOT_PY, [xdot.py], [echo xdot.py])
1203 if test "$XDOT_PY" != "echo xdot.py" ; then
1204 AC_DEFINE([HAVE_XDOT_PY],[1],[Define if the xdot.py program is available])
1202 AC_PATH_PROGS(XDOT, [xdot, xdot.py], [echo xdot])
1203 if test "$XDOT" != "echo xdot" ; then
1204 AC_DEFINE([HAVE_XDOT],[1],[Define if the xdot program is available])
12051205 dnl If we're targeting for mingw we should emit windows paths, not msys
12061206 if test "$llvm_cv_os_type" = "MingW" ; then
1207 XDOT_PY=`echo $XDOT_PY | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' `
1208 fi
1209 AC_DEFINE_UNQUOTED([LLVM_PATH_XDOT_PY],"$XDOT_PY${EXEEXT}",
1210 [Define to path to xdot.py program if found or 'echo xdot.py' otherwise])
1207 XDOT=`echo $XDOT | sed 's/^\/\([[A-Za-z]]\)\//\1:\//' `
1208 fi
1209 AC_DEFINE_UNQUOTED([LLVM_PATH_XDOT],"$XDOT${EXEEXT}",
1210 [Define to path to xdot program if found or 'echo xdot' otherwise])
12111211 fi
12121212
12131213 dnl Find the install program
270270 llvm_find_program(fdp)
271271 llvm_find_program(dot)
272272 llvm_find_program(dotty)
273 llvm_find_program(xdot.py)
273 llvm_find_program(xdot xdot.py)
274274 llvm_find_program(Graphviz)
275275
276276 if( LLVM_ENABLE_FFI )
743743 CIRCO
744744 GV
745745 DOTTY
746 XDOT_PY
746 XDOT
747747 INSTALL_PROGRAM
748748 INSTALL_SCRIPT
749749 INSTALL_DATA
72247224 _ACEOF
72257225
72267226 fi
7227 # Extract the first word of "xdot.py", so it can be a program name with args.
7228 set dummy xdot.py; ac_word=$2
7227 for ac_prog in xdot, xdot.py
7228 do
7229 # Extract the first word of "$ac_prog", so it can be a program name with args.
7230 set dummy $ac_prog; ac_word=$2
72297231 { echo "$as_me:$LINENO: checking for $ac_word" >&5
72307232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7231 if test "${ac_cv_path_XDOT_PY+set}" = set; then
7233 if test "${ac_cv_path_XDOT+set}" = set; then
72327234 echo $ECHO_N "(cached) $ECHO_C" >&6
72337235 else
7234 case $XDOT_PY in
7236 case $XDOT in
72357237 [\\/]* | ?:[\\/]*)
7236 ac_cv_path_XDOT_PY="$XDOT_PY" # Let the user override the test with a path.
7238 ac_cv_path_XDOT="$XDOT" # Let the user override the test with a path.
72377239 ;;
72387240 *)
72397241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
72437245 test -z "$as_dir" && as_dir=.
72447246 for ac_exec_ext in '' $ac_executable_extensions; do
72457247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
7246 ac_cv_path_XDOT_PY="$as_dir/$ac_word$ac_exec_ext"
7248 ac_cv_path_XDOT="$as_dir/$ac_word$ac_exec_ext"
72477249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
72487250 break 2
72497251 fi
72517253 done
72527254 IFS=$as_save_IFS
72537255
7254 test -z "$ac_cv_path_XDOT_PY" && ac_cv_path_XDOT_PY="echo xdot.py"
72557256 ;;
72567257 esac
72577258 fi
7258 XDOT_PY=$ac_cv_path_XDOT_PY
7259 if test -n "$XDOT_PY"; then
7260 { echo "$as_me:$LINENO: result: $XDOT_PY" >&5
7261 echo "${ECHO_T}$XDOT_PY" >&6; }
7259 XDOT=$ac_cv_path_XDOT
7260 if test -n "$XDOT"; then
7261 { echo "$as_me:$LINENO: result: $XDOT" >&5
7262 echo "${ECHO_T}$XDOT" >&6; }
72627263 else
72637264 { echo "$as_me:$LINENO: result: no" >&5
72647265 echo "${ECHO_T}no" >&6; }
72657266 fi
72667267
72677268
7268 if test "$XDOT_PY" != "echo xdot.py" ; then
7269 test -n "$XDOT" && break
7270 done
7271 test -n "$XDOT" || XDOT="echo xdot"
7272
7273 if test "$XDOT" != "echo xdot" ; then
72697274
72707275 cat >>confdefs.h <<\_ACEOF
7271 #define HAVE_XDOT_PY 1
7276 #define HAVE_XDOT 1
72727277 _ACEOF
72737278
72747279 if test "$llvm_cv_os_type" = "MingW" ; then
7275 XDOT_PY=`echo $XDOT_PY | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
7280 XDOT=`echo $XDOT | sed 's/^\/\([A-Za-z]\)\//\1:\//' `
72767281 fi
72777282
72787283 cat >>confdefs.h <<_ACEOF
7279 #define LLVM_PATH_XDOT_PY "$XDOT_PY${EXEEXT}"
7284 #define LLVM_PATH_XDOT "$XDOT${EXEEXT}"
72807285 _ACEOF
72817286
72827287 fi
1054510550 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1054610551 lt_status=$lt_dlunknown
1054710552 cat > conftest.$ac_ext <
10548 #line 10549 "configure"
10553 #line 10554 "configure"
1054910554 #include "confdefs.h"
1055010555
1055110556 #if HAVE_DLFCN_H
2358723592 CIRCO!$CIRCO$ac_delim
2358823593 GV!$GV$ac_delim
2358923594 DOTTY!$DOTTY$ac_delim
23590 XDOT_PY!$XDOT_PY$ac_delim
23595 XDOT!$XDOT$ac_delim
2359123596 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
2359223597 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
2359323598 INSTALL_DATA!$INSTALL_DATA$ac_delim
507507 #cmakedefine HAVE_WRITEV ${HAVE_WRITEV}
508508
509509 /* Define if the xdot.py program is available */
510 #cmakedefine HAVE_XDOT_PY ${HAVE_XDOT_PY}
510 #cmakedefine HAVE_XDOT ${HAVE_XDOT}
511511
512512 /* Define to 1 if you have the header file. */
513513 #cmakedefine HAVE_ZLIB_H ${HAVE_ZLIB_H}
656656 /* Define to path to twopi program if found or 'echo twopi' otherwise */
657657 #cmakedefine LLVM_PATH_TWOPI "${LLVM_PATH_TWOPI}"
658658
659 /* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
660 #cmakedefine LLVM_PATH_XDOT_PY "${LLVM_PATH_XDOT_PY}"
659 /* Define to path to xdot.py program if found or 'echo xdot' otherwise */
660 #cmakedefine LLVM_PATH_XDOT "${LLVM_PATH_XDOT}"
661661
662662 /* Installation prefix directory */
663663 #cmakedefine LLVM_PREFIX "${LLVM_PREFIX}"
511511 /* Define to 1 if you have the `writev' function. */
512512 #undef HAVE_WRITEV
513513
514 /* Define if the xdot.py program is available */
515 #undef HAVE_XDOT_PY
514 /* Define if the xdot program is available */
515 #undef HAVE_XDOT
516516
517517 /* Define to 1 if you have the header file. */
518518 #undef HAVE_ZLIB_H
661661 /* Define to path to twopi program if found or 'echo twopi' otherwise */
662662 #undef LLVM_PATH_TWOPI
663663
664 /* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
665 #undef LLVM_PATH_XDOT_PY
664 /* Define to path to xdot program if found or 'echo xdot' otherwise */
665 #undef LLVM_PATH_XDOT
666666
667667 /* Installation prefix directory */
668668 #undef LLVM_PREFIX
114114 if (!ExecGraphViewer(Graphviz, args, Filename, wait, ErrMsg))
115115 return;
116116
117 #elif HAVE_XDOT_PY
118 std::vector args;
119 args.push_back(LLVM_PATH_XDOT_PY);
117 #elif HAVE_XDOT
118 std::vector args;
119 args.push_back(LLVM_PATH_XDOT);
120120 args.push_back(Filename.c_str());
121121
122122 switch (program) {
130130 args.push_back(0);
131131
132132 errs() << "Running 'xdot.py' program... ";
133 if (!ExecGraphViewer(LLVM_PATH_XDOT_PY, args, Filename, wait, ErrMsg))
133 if (!ExecGraphViewer(LLVM_PATH_XDOT, args, Filename, wait, ErrMsg))
134134 return;
135135
136136 #elif (HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \