Analytic functions defined by integrals

Suppose I define a function using an integral:

$$f(z)=\int_{\mathbb R} g(z,x)\ dx,$$

where $g$ is some function, $z$ is a complex variable, and $x$ is a real variable. Suppose the integral exists for $z\in U$, where $U$ is some open region. What are sufficient conditions on $g$ so that $f$ is analytic here, and why do they suffice?

I looked in Ahlfors but couldn't find anything relevant.

-
Ahlfors probably states and proves Morera's theorem. That can prove analyticity of the Gamma function and the Riemann zeta function. –  Michael Hardy Nov 5 '12 at 0:44
Perhaps consult some previous questions and their answers: math.stackexchange.com/questions/177953 or math.stackexchange.com/questions/81949 or maybe several others –  GEdgar Nov 5 '12 at 1:22

It suffices that $g$ is analytic in $z \in U$ for each $x\in {\mathbb R}$ and $\int_{\mathbb R} |g(z,x)|\ dx$ is locally uniformly bounded on compact subsets of $U$. For then if $\Gamma$ is any closed triangle in $U$, Fubini's theorem says $\oint_\Gamma f(z) \ dz = \int_{\mathbb R} \oint_\Gamma g(z,x)\ dz\; dx = 0$, and Morera's theorem says $f$ is analytic in $U$.

EDIT: I guess we'd better also assume that $g(z,x)$ is measurable.

-
In the long run, a person will better preserve their sanity if such questions are construed as asking when an integral of a function-valued function lies again in the same space as the integrands (and, naturally, with other reasonable compatibilities). Although I anticipate that the kind of answer I am about to give is not as "immediate" as probably desired, I do recommend it long-term: in almost all cases I know, an integral of (parametrized) vectors lies again in the same TVS when the integral can be written as a continuous, compactly-supported integral of vector-valued functions, and ... –  paul garrett Nov 5 '12 at 0:58
... invoke existence of Gelfand-Pettis (a.k.a. "weak") integrals of such functions, with values in a quasi-complete (locally convex) TVS. –  paul garrett Nov 5 '12 at 0:58