Since we now define an integral as the limit of a Riemann sum, but integrals were developed long before Riemann lived, what's going on here? Did integrals have a different definition when they were developed? Did Riemann's name get slapped on an older technique? It seems Riemann sums would predate integrals, if just for their simplicity.
Calculus developed in a very hand-wavy, informal fashion. There were several objectors to calculus and the conclusions it led to. Notably, George Berkeley wrote The Analyst, a treatise against calculus and its proponents. Berkeley was actually right as neither Newton or Leibniz actually defined what they were thinking about when talking about infinitesimals. Instead, they simply dismissed "vanishingly small" quantities in some places and didn't dismiss them in other places without very clear justification. Nonetheless, calculus grew to be very useful in physics, despite being on logically-shaky ground at the time. To address your question directly, integral didn't really have a definition when calculus was first invented.
During the 19th century several mathematicians made their endeavor to put calculus on solid footing. Some of them were Weierstrass, Dedekind, Cauchy and Bolzano. Riemann was also one of them and he helped formalize integrals. Riemann worked on top of Bolzano's work on the delta-epsilon definition of the limit. These mathematicians founded the field of real analysis, which is pretty much "serious calculus". But you're right, the idea of infinitely convergent sums was known in antiquity but never with enough rigor. This means integral calculus was invented before differential calculus. We can thank Riemann for defining and proving his definitions were sound. Even after him the Riemann integral leads to some ugly theoretical warts solved by alternative definition such as Riemann-Stieltjes integrals and the Lebesgue integral proposed at the end of the 19th century. All of this was ground-breaking work and often didn't follow Newton's/Leibniz's derivations at all. In fact, they didn't use infinitesimals at all.
Let's stop here for a second and draw a clear distinction between integrals and antiderivatives. Integrals refer to sums and its link to antiderivatives through the Fundamental Theorem of Calculus was not known for a long time after the concept of integrals was discovered. In fact, you can compute definite integrals without ever resorting to antiderivatives (and thus to the Fundamental theorem of calculus) and working directly with the definition of a Riemann sum. It's much harder, but definitely possible.
Even after all these great mathematicians created Real Analysis some other mathematicians followed Newton's/Leibniz's ideas, derivation and intuition to create the field of Non-standard Analysis which finally vindicated the creators of calculus well into the 20th century by Abraham Robinson at UCLA. It has also been proved that standard and non-standard analysis are equivalent and lead to the same conclusions.
I wrote all this from memory and from my phone. Hope that's good enough for this sub :) I would be happy to expand on any part of this.