 ;; rtags setup ;;
 ;;;;;;;;;;;;;;;;;
 
-(require 'rtags)
-(require 'company)
-(require 'flycheck-rtags)
-
-(condition-case nil ; The following commands will fail if rtags is not installed.
+(if (executable-find "rc")
+  (condition-case nil ; The following commands will fail if rtags is not installed.
     (progn
+      (require 'rtags)
+      (require 'company)
+      (require 'flycheck-rtags)
+
       (setq rtags-autostart-diagnostics t)
       (rtags-diagnostics)
       (setq rtags-completions-enabled t)

;;(setenv "PYTHONHOME" "~/.elpy-libraries/easy_install")

(elpy-enable)
(condition-case nil
    (if (file-exists-p "~/.elpy-virtualenv")
        (pyvenv-activate "~/.elpy-virtualenv")
      (warn "No virtualenv found at ~/.elpy-virtualenv"))
  (error "Failed to init elpy virtualenv"))

;;;;;;;;;;;;;;;
;; Lua stuff ;;

;; (Cisco Aurora specific)                                                          ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; (setenv "PATH"
;;   (concat
;;    "/home/wvanders/pkgs/bin" ":"
;;    (getenv "PATH")))

;; (setenv "LD_LIBRARY_PATH"
;;   (concat
;;    "/home/wvanders/pkgs/lib" ":"
;;    "/home/wvanders/pkgs/lib64" ":"
;;    (getenv "PATH")))

;;;;;;;;;;;;;;;;;;;;;;;
;; Utility functions ;;
